Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql find tables with name

SELECT table_name 
FROM information_schema.tables 
WHERE table_type = 'base table' AND table_name like '%YOUR TABLE NAME%';
Comment

mysql search for column name in all tables

SELECT DISTINCT TABLE_NAME, COLUMN_NAME 
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%partial_column_name%'
    AND TABLE_SCHEMA='YourDatabase';
Comment

mysql find tables with column name

SELECT DISTINCT TABLE_NAME 
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE COLUMN_NAME IN ('columnA','ColumnB')
        AND TABLE_SCHEMA='YourDatabase';
Comment

find a column in all tables mysql

SELECT DISTINCT TABLE_NAME 
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE COLUMN_NAME IN ('columnA','ColumnB')
        AND TABLE_SCHEMA='YourDatabase';
Comment

PREVIOUS NEXT
Code Example
Sql :: how to install psql in ubuntu 
Sql :: restart postgresql.service Failed to restart postgresql.service: Unit not found. 
Sql :: pdo mysql insert 
Sql :: c# datetime to sql server datetime 
Sql :: STRING_AGG order by 
Sql :: oracle list functions 
Sql :: oracle rename table 
Sql :: mysql show indexes on table 
Sql :: mysql server does not start mac 
Sql :: how to set an already made tables auto increment in mysql 
Sql :: create new table plsql 
Sql :: truncate table mysql 
Sql :: mysql last day of next month 
Sql :: oracle last character of string 
Sql :: mysql connection with sqlalchecmy 
Sql :: stop mysql ubuntu 
Sql :: postgresql drop primary key constraint 
Sql :: sql server check port number 
Sql :: how to get current date in mysql 
Sql :: show all tables in oracle 
Sql :: mysql get db name 
Sql :: describe table mysql 
Sql :: how to check database username and password in postgresql 
Sql :: sql print all names that start with a given letter 
Sql :: oracle current timestamp 
Sql :: how to start mysql in terminal 
Sql :: mysql remove definers 
Sql :: oracle sql first day of year 
Sql :: mssql get all table names 
Sql :: date_format for time sql 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =