How to list all schemas in a database?



How to list all schemas in a database?..

Answer / Brajendra Singh

To list all schemas (or databases) in an MS SQL Server instance, you can use the following query:
```sql
SELECT name AS SchemaName FROM sys.databases;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

HOW TO FIND THE EMPLOYEE DETAILS WHO ARE GETTING SAME SALARY IN EMP TABLE

18 Answers   Infosys, TCS,


What is the bookmark lookup and rid lookup?

1 Answers  


What are the default system databases in sql server 2000?

1 Answers  


When do u use clustered index and non-clustered index?

3 Answers   IBM,


Explain having clause?

1 Answers  


What is use of attribute hierarchy ordered ? : sql server analysis services, ssas

1 Answers  


What is log shipping?

1 Answers  


difference between function and procedure

3 Answers   Cognizant, HCL, TCS, Theorem,


How to skip remaining statements in a loop block using continue statements?

1 Answers  


What is a View ? Can we insert, Update and delete a view?

1 Answers   Arigo Infotech,


Can you get second highest salary from the table?

1 Answers   QuestPond,


What are the difference between clustered and a non-clustered index?

1 Answers  


Categories