How to get a list of columns using the "sys.columns" view in ms sql server?



How to get a list of columns using the "sys.columns" view in ms sql server?..

Answer / Ajay Raj Singh

"To get a list of columns using the 'sys.columns' view in MS SQL Server, use the following query:nn```sqlndbcc table('sys.columns', 'table_name');n``"nReplace 'table_name' with the name of your table.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

While you are inserting values into a table with the insert into .. Values option, does the order of the columns in the insert statement have to be the same as the order of the columns in the table?

1 Answers  


What are the dis_advantages of stored procedures, triggers, indexes?

1 Answers  


what is the system function to get current user's user id? : Sql server database administration

1 Answers  


What is database replication?

1 Answers  


What are the differences between clustered and non-clustered index?

1 Answers  


if no size is defined while creating the database, what size will the database have? : Sql server administration

1 Answers  


What is the difference between the export /import functions in sql studio and standalone sql manager? : sql server management studio

1 Answers  


What are .mdf files?

1 Answers  


How can you swap values between two rows in a table using single- SQL statement?

1 Answers   Tavant Technologies, Virtusa,


what are defaults? : Sql server database administration

1 Answers  


How to use copy and concatenate commands in SQL?

1 Answers   Amdocs,


How to test values returned by a subquery with the in operator?

1 Answers  


Categories