- List all user tables in the current library SELECT table name = namefrom sysobjectswhere = 0 = 'u' and status> = 0
- List all system tables in the current library Select table name = namefrom sysobjectswhere xtype = 's'
- List all the views in the current library SELECT table name = namefrom sysobjectswhere = '=' v '
- List all user views in the current library SELECT table name = namefrom sysobjectswhere xtype = 'v' and status> = 0
Xtype = 'u'
Xtype = 's'
- Call the stored procedure you said to be implemented, to query the Pubs library as an example of USE Pubsgo
- List system tables EXEC SP_TABLES NULL, DBO, PUBS, "'System Table'"
- List user tables EXEC SP_TABLES NULL, DBO, PUBS, "'TABLE'"
- List views EXEC SP_TABLES NULL, DBO, PUBS, "'View'"