How to list all objects in a given schema?



How to list all objects in a given schema?..

Answer / Shreyansh Verma

To list all objects in a specific schema, use the OBJECT command. Here's an example:

```sql
OBJECT_NAMES(object_id::[SchemaName], [type])
```
Replace `[SchemaName]` with the name of your schema and `[type]` with the type of object you want to list (e.g., U for user-defined functions, P for procedures, Tr for triggers, etc.).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Why use “in” clause in sql server?

1 Answers  


Difference between server.transfer and server.execute method?

2 Answers  


What is excution Plan in sql server

1 Answers   CarrizalSoft Technologies, TCS,


How to remove duplicate rows from table except one?

0 Answers  


How can I track the changes or identify the latest insert-update-delete from a table?

1 Answers  


CLR Integration ? what is Notification services ?

1 Answers   HCL, Satyam,


Is it possible to delete duplicate rows in a table without using a temporary table ?

12 Answers   TCS,


Does partitioning improve performance sql server?

1 Answers  


Can you change the data type of a column in a table after the table has been created? If so, which command would you use?

1 Answers  


How to drop existing indexes in ms sql server?

1 Answers  


What's the information that can be stored inside a bit column?

1 Answers  


What is #table in sql server?

1 Answers  


Categories