Tuesday, February 3, 2009

To get column names from a particular Table

Execute below query on a particular Database.

select column_name, data_type from information_schema.columns where table_name='myTableName'

which gives all the column names that Table.

Here the where condition is for getting details from the given Table.

1 comment:

Post a Comment