Thursday, August 6, 2009

Sql Query for return columns name of a table

SELECT
COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'tempTble'
ORDER BY ORDINAL_POSITION

//Put the tablename as i did 'tempTble'

No comments:

Post a Comment