Search
 
SCRIPT & CODE EXAMPLE
 

SQL

list all columns in a table sql

SHOW COLUMNS FROM table_name
Comment

get all columns from table sql

SELECT
  	TABLE_NAME
FROM
  	INFORMATION_SCHEMA.TABLES
Comment

sql all columns

-- MySQL
SELECT * 
FROM INFORMATION_SCHEMA.COLUMNS;

-- SQL Server (possible solution)
SELECT * 
FROM SYS.COLUMNS;

-- Oracle
SELECT * 
FROM ALL_TAB_COLS; -- (If you only want user-defined columns)
-- ALL_TAB_COLS : only user-defined columns
-- ALL_TAB_COLUMNS : both user-defined AND system columns
Comment

get all columns in a table sql

sp_columns feeAgreement
-- or 
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'feeAgreement'
Comment

select all column

SELECT * FROM MyTable WHERE COLLATE(Col1, Col2, Col3, Col4......) IS NULL
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle list grants on package 
Sql :: select list is not in group by clause and contains nonaggregated column codeigniter 
Sql :: mysql update from select on same table 
Sql :: postgres set null 
Sql :: sql #region 
Sql :: in mysql workbench contnent not feching 
Sql :: oracle apex charging debug 
Sql :: postgres list users 
Sql :: oracle sql drop column if exists 
Sql :: difference between primary key and unique key 
Sql :: multiple like in sql 
Sql :: postgresql Create a new role with a username and password 
Sql :: constraints to columns SQL 
Sql :: 3rd highest value in sql 
Sql :: sql update insert and delete 
Sql :: sqlite3 import csv 
Sql :: postgresql get connection string 
Sql :: between from sql 
Sql :: oracle shrink table 
Sql :: mysql execute file 
Sql :: mysql order by two columns priority 
Sql :: mysql count by month 
Sql :: allow null in psql 
Sql :: update sqlite 
Sql :: mysql set boolean default value 
Sql :: intellij mysql set timezone 
Sql :: Query to remove duplicate rows from a table 
Sql :: sql datitime to date 
Sql :: postgresql procedure example 
Sql :: select from select sql server 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =