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

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

find a column by name in a sql server table

Get Table by Column Name
Comment

PREVIOUS NEXT
Code Example
Sql :: psql filed name alter 
Sql :: alter table delete column 
Sql :: mysql modify foreign key 
Sql :: get year from date postgres 
Sql :: mysql select last 15 minutes 
Sql :: delete first row in sql 
Sql :: sql drop view if exists 
Sql :: postgres change owner of schema 
Sql :: oracle table statistics last analyzed 
Sql :: sqlite list columns 
Sql :: how to change table name in sqlite 
Sql :: add column table sql default value 
Sql :: convert sqlite table to pandas dataframe 
Sql :: postgres read table structure 
Sql :: oracle to date 
Sql :: command line mysql import 
Sql :: check all sequences oracle sql 
Sql :: concat first name and last name in mysql 
Sql :: count mysql server db tables 
Sql :: mysql get first 2 characters of string 
Sql :: set statiscis on in ssms 
Sql :: delete triger pl pg sql 
Sql :: sql current_timestamp 
Sql :: oracle export trigger ddl 
Sql :: Aqua Data studio postgresql ssl 
Sql :: mysql show carset 
Sql :: get rows affected mysql python 
Sql :: change table to innodb mysql 
Sql :: sqlite create index 
Sql :: the package java.sql is not accessible 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =