Search
 
SCRIPT & CODE EXAMPLE
 

SQL

get a list of table names and field names from SQL

     SELECT
          TABLE_SCHEMA AS TABLE_SCHEMA
         ,TABLE_NAME AS TABLE_NAME
         ,COLUMN_NAME AS COLUMN_NAME
     FROM INFORMATION_SCHEMA.COLUMNS

    --Where COLUMN_NAME Like '%Put_Your_Comumn_Name_HERE%' 
        
     ORDER BY
          TABLE_SCHEMA
         ,TABLE_NAME
         ,COLUMN_NAME;
Comment

Get all table names in SQL

SELECT name, crdate FROM SYSOBJECTS WHERE xtype = 'U';
-- or 
SELECT * FROM INFORMATION_SCHEMA.TABLES
-- or 
SELECT * FROM databaseName.INFORMATION_SCHEMA.TABLES;
Comment

get table column names sql

SELECT      COLUMN_NAME AS 'ColumnName'
FROM        INFORMATION_SCHEMA.COLUMNS 
WHERE 
TABLE_NAME LIKE '%assembly_armatureassy_tbl%' 
and COLUMN_NAME LIKE '%supplied%'
Comment

PREVIOUS NEXT
Code Example
Sql :: show all table name mysql 
Sql :: delete all rows from table sql 
Sql :: Query the list of CITY names from STATION that do not start with vowels and do not end with vowels. Your result cannot contain duplicates. 
Sql :: postgresql make each element in array distinct 
Sql :: check mysql version phpmyadmin 
Sql :: Are NULL values in a database the same as that of blank space or zero? 
Sql :: rows to comma separated values in mssql 
Sql :: first letter capital in mysql query 
Sql :: get parameter value in mysql trigger 
Sql :: update in sql 
Sql :: sql sort column by date 
Sql :: how to see all table partition in oracle 
Sql :: how to install sqlite3 python 
Sql :: how to count null values in mysql 
Sql :: select from array in psql 
Sql :: mysql select utc time in eastern time 
Sql :: sql today at midnight 
Sql :: sql server 2008 first and last day of month 
Sql :: python mysql search 
Sql :: mysql set primary key 
Sql :: mysql update set sum 
Sql :: oracle user privileges 
Sql :: oracle alter tablespace add datafile autoextend max size 
Sql :: postgresql insert select 
Sql :: mysql parse int 
Sql :: tsql random number 
Sql :: docker run mysql image 
Sql :: foreign key sqlite3 python 
Sql :: delete all content in table mysql 
Sql :: sql create a new table 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =