MSSQL Interview Questions and Answers
Question: How To Get a List of All Tables with "sys.tables" View in MS SQL Server?Answer: If you want to see the table you have just created, you can use the "sys.tables" system view to get a list of all tables in the current database. The tutorial script gives you a good example:SELECT name, type_desc, create_date FROM sys.tables GO name type_desc create_date wb USER_TABLE 2007-05-19 23:05:43.700 The output shows that there is only one table in the current database. |
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?