Monday, September 9, 2013

How To Get a List of Columns in a View using the "sp_columns" Stored Procedure?


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.

No comments:

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)

Userexits/BADIs

Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

Blog Archive

goodsites