RE: Show Description options??

2006-01-19 Thread ISC Edwin Cruz
If you are using mysql 5.x you must be able to retrieve that you want using
information_schema database
Look:

mysql select version();
+-+
| version()   |
+-+
| 5.0.16-standard |
+-+
1 row in set (0.00 sec)

mysql use information_schema;
Database changed
mysql SELECT column_name,data_type FROM COLUMNS C where table_schema =
'erp' and table_name='TAnticipo';
+-+---+
| column_name | data_type |
+-+---+
| idTAnticipo | int   |
| TEmpleado_idTEmpleado   | int   |
| TViaje_idTViaje | int   |
| TTipoGasto_idTTipoGasto | int   |
| no_vale | char  |
| fecha   | date  |
| tipo| char  |
| cantidad| tinyint   |
| importe | double|
| iva | double|
| observacion | char  |
| activo  | char  |
+-+---+
12 rows in set (0.01 sec)

mysql


Regards!

++
| ISC Edwin Cruz [EMAIL PROTECTED]|
| Desk:  52 (449) 910 30 90 x3054|
| MX Mobile: 52 (449) 111 29 03  |
| Skype: e-cruz  |
++



-Mensaje original-
De: Mike OK [mailto:[EMAIL PROTECTED] 
Enviado el: Jueves, 19 de Enero de 2006 10:34 a.m.
Para: mysql@lists.mysql.com
Asunto: Show Description options??


Hi

I was looking for a command that will list the names of my columns only.
I have investigated show columns but there seems to be no way to return just
the names.  Any suggestions??  Thanks Mike


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Show Description options??

2006-01-19 Thread Gordon Bruce
If you are on 5.0.x you can use 

SELECT column_Name 
FROM   INFORMATION_SCHEMA.columns;


INFORMATION_SCHEMA is a set of VIEWS that lets you access the database
structure. See 

http://dev.mysql.com/doc/refman/5.0/en/information-schema.html

-Original Message-
From: Mike OK [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 19, 2006 10:34 AM
To: mysql@lists.mysql.com
Subject: Show Description options??

Hi

I was looking for a command that will list the names of my columns
only.
I have investigated show columns but there seems to be no way to return
just
the names.  Any suggestions??  Thanks Mike


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]