Search
 
SCRIPT & CODE EXAMPLE
 

SQL

get schema of table sql

SELECT `table_schema` 
FROM `information_schema`.`tables` 
WHERE `table_name` = 'whatever';
Comment

sql server get schema of table


-- This first query will return all of the tables in the database you are querying.
SELECT
  	TABLE_NAME
FROM
  	INFORMATION_SCHEMA.TABLES
ORDER BY TABLE_NAME


-- The second query will return a list of all the columns and tables in the database you are querying.
SELECT
  	TABLE_NAME,
	COLUMN_NAME
FROM
  	INFORMATION_SCHEMA.COLUMNS
ORDER BY TABLE_NAME
Comment

PREVIOUS NEXT
Code Example
Sql :: sql get last id 
Sql :: execute mysql file 
Sql :: mysql docker image for macbook m1 
Sql :: postgresql extract hour and minutes from timestamp 
Sql :: sql add column to table 
Sql :: change default schema sql server 
Sql :: sql duplicate rows 
Sql :: how to get nearest location in mysql with latitude and longitude 
Sql :: regex mongoose 
Sql :: reseed sql table primary key 
Sql :: postgresql dump and restore db 
Sql :: get all tables using like 
Sql :: add primary key with auto increment sql server 
Sql :: add column if not exists mysql 
Sql :: create table postgresql foreign key 
Sql :: How to check event scheduler status mysql 
Sql :: sql server list locks 
Sql :: oracle nextval 
Sql :: phpmyadmin reset root password 
Sql :: store select query result in variable sql server 
Sql :: inner join update 
Sql :: oracle list datafiles 
Sql :: mysql disable query caching 
Sql :: python pandas df to postgres json table 
Sql :: get first monday of month sql 
Sql :: excel export from sql using python 
Sql :: drop a recordin sql 
Sql :: Get first 10 in sql 
Sql :: how to inner join 4 tables in sql 
Sql :: mariadb json_extract 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =