Collections:
"sp_columns" - Getting a List of Columns in a View in SQL Server
How To Get a List of Columns in a View using the "sp_columns" Stored Procedure in SQL Server?
✍: FYIcenter.com
If you have an existing table, but you don't remember what are the columns defined in the view, you can use the "sp_columns" stored procedure to get a list of all columns of the specified view. The following tutorial script shows you a good example:
EXEC SP_COLUMNS fyi_links_top; GO TABLE_OWNER TABLE_NAME COLUMN_NAME TYPE_NAME LENGTH ----------- ------------- ----------- --------- ------ dbo fyi_links_top id int 4 dbo fyi_links_top counts int 4 dbo fyi_links_top url varchar 80 (3 row(s) affected)
The "sp_columns" stored procedure returns a long list of properties for each column of the specified view.
⇒ "sp_help" - Getting a List of Columns in a View in SQL Server
⇐ "sys.columns" - Getting a List of Columns in a View in SQL Server
2016-11-05, 1725👍, 0💬
Popular Posts:
How To Drop an Index in Oracle? If you don't need an existing index any more, you should delete it w...
How To Round a Numeric Value To a Specific Precision in SQL Server Transact-SQL? Sometimes you need ...
What Is SQL*Plus in Oracle? SQL*Plus is an interactive and batch query tool that is installed with e...
How To Insert New Line Characters into Strings in SQL Server Transact-SQL? If you want to break a st...
How to continue to the next iteration of a WHILE loop in SQL Server Transact-SQL? How to use CONTINU...