Welcome Guest!
Please login
If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:
- Receive Fast Advice
- Learn Programming Languages
- Get Professional Website Reviews
- Quick Troubleshooting Assistance
|
|
Find Field Type And Length?
This is a discussion on Find Field Type And Length?, within the MySQL section. This forum and the thread "Find Field Type And Length?" are both part of the Programming Your Website category.
![]() ![]() |
Apr 14 2008, 10:45 AM
Post
#1
|
|
|
Master of the Universe ![]() Posts: 1,297 Joined: 15-February 08 From: London, England |
A bit like the title suggests. How can I find out the Field type and field length in a database table?
-------------------- |
|
|
Apr 14 2008, 12:23 PM
Post
#2
|
|
![]() Squeezing ![]() ![]() ![]() Posts: 76 Joined: 14-February 08 From: Las Vegas, NV |
A bit like the title suggests. How can I find out the Field type and field length in a database table? Are you talking about finding this out through code? -------------------- http://www.infoonmike.com
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." Martin Golding |
|
|
Apr 14 2008, 12:52 PM
Post
#3
|
|
|
Master of the Universe ![]() Posts: 1,297 Joined: 15-February 08 From: London, England |
I want a query which instead of telling me what is in the table, will tell me about the table.
So title - varchar(120) All I am interested in getting is the Field name, field type and field length. The contents of the table are of no interest to me. I am looking to do this in an SQL query. -------------------- |
|
|
Apr 14 2008, 03:49 PM
Post
#4
|
|
![]() Squeeze Machine ![]() Posts: 760 Joined: 13-February 08 From: Catching the squeezed drips downunder. |
You can use either EXPLAIN, DESCRIBE or SHOW COLUMNS to get information about a table and its columns.
CODE SHOW COLUMNS FROM tableName
WHERE `Columns` LIKE 'columnName' --- EXPLAIN tableName --- DESCRIBE tableName -------------------- |
|
|
If you found The Web Squeeze to be helpful, please donate so we can keep this site FREE, FRESH, and fortified with Web Design & Development info!
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
6 | JustinStudios | 211 | 28th March 2008 - 04:44 AM Last post by: Daniel |
|||
![]() |
2 | 902 | 205 | 12th April 2008 - 08:47 AM Last post by: 902 |
|||
![]() |
6 | Jason | 385 | 25th May 2008 - 05:45 AM Last post by: velo |
|||
![]() |
6 | mv08jml | 482 | 24th June 2008 - 05:45 PM Last post by: Justify |
|||
![]() |
7 | rich97 | 531 | 30th August 2008 - 09:55 PM Last post by: mv08jml |
|||






Apr 14 2008, 10:45 AM










