![]() | ![]() |
Home |
|
|
Transact-SQL User's Guide |
|
| Chapter 9 Views: Limiting Access to Data |
|
| Getting information about views |
|
| Listing all views in a database |
sp_tables lists all views in a database when used in the following format:
sp_tables @table_type = "'VIEW'"Finding an object name and ID
The system functions object_id() and object_name() identify the ID and name of a view. For example:
select object_id("titleview")---------- 480004741
Object names and IDs are stored in the sysobjects table.
|
|