Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql get column names from table

SELECT `COLUMN_NAME` 
FROM `INFORMATION_SCHEMA`.`COLUMNS` 
WHERE `TABLE_SCHEMA`='yourdatabasename' 
    AND `TABLE_NAME`='yourtablename';
Comment

mysql get table column names and data types

mysql> select column_name,data_type from information_schema.columns where table_schema = 'business' and table_name = 'DataTypeDemo';
Comment

PREVIOUS NEXT
Code Example
Sql :: Write an SQL query to fetch the count of employees working in the department ‘Admin’. 
Sql :: split string and copy last element postgresql 
Sql :: Host ' is not allowed to connect to this MySQL server 
Sql :: sql not in operator 
Sql :: initialize sql date 
Sql :: sql with as 
Sql :: rename temp table column name in sql server 
Sql :: oracle undo usage per session 
Sql :: greater than or equal to symbol in postgres 
Sql :: mysql delete duplicate rows except one 
Sql :: sql select where id not exists in another table 
Sql :: sql join on wildcard 
Sql :: Truncate a table then insert data 
Sql :: mysql create view 
Sql :: mysql select smaller of two values 
Sql :: install pymysql in python 3 in windows 7 v2.7.10 codes with pip 
Sql :: insert command in sql 
Sql :: sql select statements 
Sql :: Ms Sql set us timezone 
Sql :: get first match in each group mysql query 
Sql :: sql order by clause 
Sql :: mysql filter based on datediff 
Sql :: how to reset autoincrement in sqlite java 
Sql :: character count sql 
Sql :: mysql run file command 
Sql :: float vs decimal sql 
Sql :: sql double quotes in string 
Sql :: How to solve "Error: MySQL shutdown unexpectedly"? 
Sql :: sql year 
Sql :: set identity_insert off 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =