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 select column names

/* How to select the column names in SQL*/

SELECT Column_name
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = N'your_table_name'
/* Just change the "your_table_name" ↑ to the name of your table */
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 column name

SELECT table_name, column_name, data_type, data_length
FROM USER_TAB_COLUMNS
WHERE table_name = 'MYTABLE'
Comment

PREVIOUS NEXT
Code Example
Sql :: ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails 
Sql :: drop multiple databases mysql 
Sql :: postgresql alter table sequence 
Sql :: can you update NULL in sql 
Sql :: set nocount on sql 
Sql :: insert data in pgsql 
Sql :: wordpress delete post revisions older than date "sql" 
Sql :: date format in sql 
Sql :: sql concat string with column value 
Sql :: db.Database.SqlQuery 
Sql :: mysql select where starts with 
Sql :: sql backup database statement 
Sql :: postgresql to_char time 
Sql :: mysql change auto_increment start value 
Sql :: how to check if a row is null in sql 
Sql :: how to print mysql query of codeigniter query builder 
Sql :: running percentage of total postgres 
Sql :: sql in array query 
Sql :: SQL Server rename foreign key constraint 
Sql :: sql drop default 
Sql :: login to mysql database 
Sql :: Get the Db column names from a SqlDataReader 
Sql :: datediff 
Sql :: how to export only procedures mysql 
Sql :: string to sql timestamp 
Sql :: sql pagination oracle 
Sql :: mysql between 
Sql :: show all event schedular on mysql 
Sql :: check lock on table in sql server 
Sql :: mysql local password denied 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =