vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| >can I get the name of the field of a known table using SQL? In MySQL, there are queries such as "describe tablename" and "show index from tablename". I don't know whether these are standard SQL or not. If you forgot the table name, there is "show tables". Gordon L. Burditt |
| |||
| thinkmarco@yahoo.it wrote: > Hi, > can I get the name of the field of a known table using SQL? > > Thanks in advance > Marco Righi In addition to the SHOW TABLES and SHOW FIELDS commands, in MySQL 5 there is also the INFORMATION_SCHEMA database, from where you can get various database objects metadata. http://dev.mysql.com/doc/refman/5.0/...on-schema.html For example: SELECT column_name, data_type from information_schema.columns where table_schema = 'your_database_name' and table_name = 'your_table_name'; ciao gmax P.S. If you are Italian, you may also post at free.it.comp.database.mysql -- _ _ _ _ (_|| | |(_|>< The Data Charmer _| http://datacharmer.blogspot.com/ |
| ||||
| > > P.S. If you are Italian, you may also post at free.it.comp.database.mysql > Yes, I'm Italian. I'm using www.mailgate.org where there is not free.it.comp.database.mysql... Grazie Marco |