MSSQL%20Interview%20Questions%20and%20Answers
Question: How To Get a List of Table Columns using the "sp_columns" Stored Procedure in MS SQL Server?Answer: If you have an existing table, but you don't remember what are the columns defined in the table, you can use the "sp_columns" stored procedure to get a list of all columns of the specified table. The following tutorial script shows you a good example:sp_columns wb GO TABLE_OWNER TABLE_NAME COLUMN_TABLE TYPE_NAME ... dbo tip id int ... dbo tip subject varchar ... dbo tip description varchar ... dbo tip create_date datetime ... The "sp_columns" stored procedure returns a long list of properties for each column of the specified table. Take a look at each of them. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is Microsoft SQL Server?
- What is the simplest way to create a new database in MS SQL Server?
- How to delete a database in MS SQL Server?
- How to download and install Microsoft .NET Framework Version 2.0?
- How To Get a List of Columns using the "sp_help" Stored Procedure in MS SQL Server?