can somebody help me
-
hi guys i have some problem regarding sql i want to print the column names of a table,i know table name i dont know columns. thanks in advance regards
AVI51 wrote:
i want to print the column names of a table,i know table name i dont know columns.
Since you posted this in the SQL forum, I am assuming that what you actually want is a way to get the column names out of the database rather than any particular presentation of the column names. If you are using SQL Server (which you don't say) you can use the views in INFORMATION_SCHEMA
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = @tableName
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Follow up on hiring a software developer * The Value of Smaller Methods My website | blog
-
hi guys i have some problem regarding sql i want to print the column names of a table,i know table name i dont know columns. thanks in advance regards
-
hi guys i have some problem regarding sql i want to print the column names of a table,i know table name i dont know columns. thanks in advance regards
you can execute
sp_help
or 1.you can type the table name in query analyzer 2.select the table name and press alt+f1 keys this works fine for me hope this helps