Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql server find table name

select * from sys.tables where name like '%tablename%'
Comment

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

search column name sql

SELECT TABLE_NAME, COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%wild%';
Comment

find tables with column name in sql

SELECT * FROM USER_TAB_COLUMNS WHERE COLUMN_NAME = 'MY_COLUMN'; -- Connected user
SELECT * FROM ALL_TAB_COLUMNS WHERE COLUMN_NAME = 'MY_COLUMN';	-- Other schemas
SELECT * FROM DBA_TAB_COLUMNS WHERE COLUMN_NAME = 'MY_COLUMN';	-- All tables
Comment

select table column name in sql

/**
You must have all privillage to access this, else it will denaid access :)
**/

SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'tableName';
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

find a column by name in a sql server table

Get Table by Column Name
Comment

PREVIOUS NEXT
Code Example
Sql :: sql drop schema 
Sql :: how remove column in mysql 
Sql :: mysql version check cmd 
Sql :: reset identity column in sql server 
Sql :: get the list of all tables in sql server 
Sql :: mysql group by day 
Sql :: crontab every month 
Sql :: The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue. 
Sql :: oracle last character of string 
Sql :: create schema sql server 
Sql :: mysql import gzip db 
Sql :: insert column with default value in sql 
Sql :: postgresql datetrunc too slow 
Sql :: how to add a index to live table sql 
Sql :: select dba users oracle 
Sql :: how to import database in mysql by cmd 
Sql :: how to give user privelege to create dblink in oracle 
Sql :: timestamp in sqlite 
Sql :: extract month from date sql two digits 
Sql :: Erreur SQL sur la requête Index column size too large. The maximum column size is 767 bytes. 
Sql :: funzioni plsql 
Sql :: rails run native ssql query 
Sql :: postgres get timestamp 
Sql :: oracle show trigger code 
Sql :: sql comment header 
Sql :: sql for date greater than 
Sql :: sql join exists 
Sql :: install mysql 8 ubuntu 18.04 
Sql :: last 6 months postgresql 
Sql :: oracle sql day of month from date 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =