What is query of display the all tables in SQL server ?
Editorial / Best Answersantanukd
Just replace "[your-schema-name-here]" in the following query with your schema name. Hope it comes handy to some of you out there.
Select 'TABLE' as OBJECT_TYPE, TABLE_NAME as OBJECT_NAME, TABLE_SCHEMA as OBJECT_SCHEMA from information_schema.VIEWS
Select 'VIEW' as OBJECT_TYPE, TABLE_NAME as OBJECT_NAME, TABLE_SCHEMA as OBJECT_SCHEMA from information_schema.VIEWS
Select 'INDEX[Type:Name:Table]' as OBJECT_TYPE, concat(CONSTRAINT_TYPE,' : ',CONSTRAINT_NAME,' : ',TABLE_NAME) as OBJECT_NAME,TABLE_SCHEMA AS OBJECT_SCHEMA from information_schema.TABLE_CONSTRAINTS
Select 'Procedure/Functions' as OBJECT_TYPE, ROUTINE_NAME as OBJECT_NAME, ROUTINE_SCHEMA as OBJECT_SCHEMA from information_schema.ROUTINES
Showing Answers 1 - 16 of 16 Answers
- Citrix xenapp 6.5 server reboot
- Replace alternate character in a string
- Display the rank in asending & descending order for salary column
- Dns server faults
- Dns query
- Retreive data from 2 tables
- Display employee records having same salary department wise
- SQL query to obtain 2nd highest mark in each subject for a student
- Display the employee details who joined before 5 days.
- Bmc remedy ticketing tool
- Testing scenarios in client payroll system
- Test UNIX login
- Display with commas
- Display previous row salary in the current row display next row salary in the current row
- Cumulative sum calculation
- Array implementation of student counseling details using queues
- Find function and query find function
- What is calculating context?
- 40 ibm Oracle DBA interview questions
- Better performance collection