A statement to query all table names and field names in the database


Statement SQL to query all table names and field names in the database:
SELECT NAME FROM SYSOBJECTS WHERE TYPE='U'
SELECT * FROM INFORMATION_SCHEMA.TABLES
Query all field names of the table:
SELECT NAME FROM SYSCOLUMNS WHERE ID=OBJECT_ID(' table name' )
SELECT * FROM INFORMATION_SCHEMA.TABLES
SELECT * FROM INFORMATION_SCHEMA.VIEWS
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
ORACLE View all table names:
SELECT TABLE_NAME FROM USER_TABLES
ACCESS View all table names:
SELECT NAME FROM MSYSOBJECTS WHERE TYPE=1 AND FLAGS=0
MSYSOBJECTS is a system object and is hidden by default. It can be displayed through tools, options, views, displays, and system objects.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324604167&siteId=291194637