Search
 
SCRIPT & CODE EXAMPLE
 

SQL

find table from column name in sql

SELECT      c.name  AS 'ColumnName'
            ,t.name AS 'TableName'
FROM        sys.columns c
JOIN        sys.tables  t   ON c.object_id = t.object_id
WHERE       c.name LIKE '%MyName%'
ORDER BY    TableName
            ,ColumnName;
Comment

sql find table by name

select table_schema,
       table_name
from information_schema.tables
where table_name like 'payment%'
      and table_schema not in ('information_schema', 'pg_catalog')
      and table_type = 'BASE TABLE'
order by table_name,
         table_schema;
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql create table from select statement 
Sql :: user_dependencies 
Sql :: influxdb list all tags for a measurement 
Sql :: counting in sql 
Sql :: sql not in 
Sql :: sql with example 
Sql :: sql view talbe columns 
Sql :: sample clause in sql 
Sql :: sqlalchemy empty table 
Sql :: mysql order by date asc null last 
Sql :: date sql 
Sql :: how to delete all duplicate items in mysql 
Sql :: get initial in sql 
Sql :: nvl in oracle 
Sql :: postgres order by month 
Sql :: postgresql must appear in the GROUP BY clause or be used in an aggregate function 
Sql :: mysql case when in select 
Sql :: create function in sql 
Sql :: delete from IN subquery 
Sql :: SQL LIMIT With OFFSET Clause 
Sql :: sql select where 
Sql :: identify primary key in oracle table 
Sql :: order by multiple columns 
Sql :: mysql get max value and id 
Sql :: postgresql newline character 
Sql :: mysql dump for selected row 
Sql :: find a column by name in a sql server table 
Sql :: duplicate record mysql 
Sql :: change column name sql 
Sql :: grant create db postgres 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =