SQL-How to check table names in SQL|How to check table names in MySQL|Database|PHPMyADMIN|Netezza

Опубликовано: 25 Март 2025
на канале: CT TUTORIAL
67
1

SQL-How to check table names in SQL|How to check table names in MySQL|Database|PHPMyADMIN

#CTTUTORIAL #SHOWTABLES #LISTTABLENAMES
In this video we will discuss, writing a transact sql query to list all the tables in a sql server database. This is a very common sql server interview question.

Object explorer with in sql server management studio can be used to get the list of tables in a specific database. However, if we have to write a query to achieve the same, there are 3 system views that we can use.
1. SYSOBJECTS - Supported in SQL Server version 2000, 2005 & 2008
2. SYS.TABLES - Supported in SQL Server version 2005 & 2008
3. INFORMATION_SCHEMA.TABLES - Supported in SQL Server version 2005 & 2008

-- Gets the list of tables only
Select * from SYSOBJECTS where XTYPE='U'
-- Gets the list of tables only
Select * from SYS.TABLES
-- Gets the list of tables and views
select * from INFORMATION_SCHEMA.TABLES

To get the list of different object types (XTYPE) in a database
Select Distinct XTYPE from SYSOBJECTS

Follow me on :

Subscribe to this Channel!
https://bit.ly/32hPbjd
https://tinyurl.com/CTTUTORIAL2020

PLAYLIST:

EXCEL VBA MACRO:https://tinyurl.com/ctexcelvbamacro


Facebook:  / arka09  
Email:[email protected]
Telegram Channel:t.me/ct_tutorial



list,all tables,sql server database,query,information_schema.tables,sys.tables,sysobjects,xtype,t-sql,sql,sql server information_schema,sql information_schema tables,SQL-How to check table names in SQL,How to check table names in MySQL,Database,PHPMyADMIN