379716 visitors has seen the Tim-Carter.com site. Thanks!
321 visitors has seen the Tim-Carter.com site today.
 
 
Search :  
 
>>> Programming >> MSSQL > SQL How to select column names from a table? (This page has been seen 737 times)

SQL How to select column names from a table?

If you want to now the Column names in a table you could do something like this

SELECT column_name, data_type, character_maximum_length from information_schema.columns WHERE table_name = 'MyTable'

OR You could run the build in stored procedure in SQL

exec sp_columns MyTable



Like (0)
 
Dislike (0)


Keywords for this article:
DATEDIFF || DATETIME || SQL || TSQL

Post comment

Name:


Comment:

Code Language:

Code:

Here you can paste a code example. It will then be processed by SyntaxHighlighter and formatted for easier readability.
Please remember to select the correct Code Language in the select above so the SyntaxHighlighter can highlight the code properly.




Code:

Please enter the code you see above

What is 9 + 7 =

Submit Comment


No one has commented on this page yet. You could be the first.


Advertisement by Google


Sponsors :