Search
 
SCRIPT & CODE EXAMPLE
 

SQL

SHOW COLUMNS Statement

SHOW [EXTENDED] [FULL] {COLUMNS | FIELDS}
    {FROM | IN} tbl_name
    [{FROM | IN} db_name]
    [LIKE 'pattern' | WHERE expr]
Comment

show columns

Copied mysql> SHOW COLUMNS FROM City;
+------------+----------+------+-----+---------+----------------+
| Field      | Type     | Null | Key | Default | Extra          |
+------------+----------+------+-----+---------+----------------+
| Id         | int(11)  | NO   | PRI | NULL    | auto_increment |
| Name       | char(35) | NO   |     |         |                |
| Country    | char(3)  | NO   | UNI |         |                |
| District   | char(20) | YES  | MUL |         |                |
| Population | int(11)  | NO   |     | 0       |                |
+------------+----------+------+-----+---------+----------------+
5 rows in set (0.00 sec)
Comment

show columns

mysql> SHOW COLUMNS FROM City;
+-------------+----------+------+-----+---------+----------------+
| Field       | Type     | Null | Key | Default | Extra          |
+-------------+----------+------+-----+---------+----------------+
| ID          | int(11)  | NO   | PRI | NULL    | auto_increment |
| Name        | char(35) | NO   |     |         |                |
| CountryCode | char(3)  | NO   | MUL |         |                |
| District    | char(20) | NO   |     |         |                |
| Population  | int(11)  | NO   |     | 0       |                |
+-------------+----------+------+-----+---------+----------------+
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql insert value date 
Sql :: mysql error 1251 
Sql :: date between in mysql 
Sql :: sql how to duplicate a table 
Sql :: sql in array query 
Sql :: change database name psql 8 
Sql :: convert money to varchar sql server 
Sql :: postgres cast as currency format 
Sql :: postgres delete all tables 
Sql :: creating a table in sql 
Sql :: t-sql merge example 
Sql :: mysql cashing error 
Sql :: sql mm/dd/yyyy format 
Sql :: rename column sql 
Sql :: insert current date in mysql 
Sql :: delete join select from one table based on multiple values 
Sql :: clear screen command on mysql 
Sql :: update query with between in mysql 
Sql :: mysql dump specific tables 
Sql :: mysql to get column name in database 
Sql :: postgresql resolv duplicate value violates unique constraint 
Sql :: postgre describe table 
Sql :: connexion mysql 
Sql :: restroe pg_dump example 
Sql :: use float in sql server string 
Sql :: insensitive case match sqlalchemy 
Sql :: postgresql Create a new role with a username and password 
Sql :: postgresql delete limit 
Sql :: sql end of month 
Sql :: count in sql and diff 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =