Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql show table column full description

/**table's full description*/
SHOW FULL COLUMNS FROM tablename;
Comment

mysql show table structure

DESCRIBE table_name; # To show table structure...
Comment

mysql show table fields

DESCRIBE my_table;
Comment

show table info mysql

Copied mysql> DESCRIBE pet;
+---------+-------------+------+-----+---------+-------+
| Field   | Type        | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| name    | varchar(20) | YES  |     | NULL    |       |
| owner   | varchar(20) | YES  |     | NULL    |       |
| species | varchar(20) | YES  |     | NULL    |       |
| sex     | char(1)     | YES  |     | NULL    |       |
| birth   | date        | YES  |     | NULL    |       |
| death   | date        | YES  |     | NULL    |       |
+---------+-------------+------+-----+---------+-------+
Comment

mysql show create table

Copied mysql> SHOW CREATE TABLE tG
*************************** 1. row ***************************
       Table: t
Create Table: CREATE TABLE `t` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `s` char(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
Comment

show table mysql

# First, select your database
USE yourDb;

# Then, simply
SHOW TABLES;
Comment

PREVIOUS NEXT
Code Example
Sql :: sql delete row with auto increment 
Sql :: lowest salary in sql 
Sql :: show all tables postgres 
Sql :: How to check event scheduler status mysql 
Sql :: get current month last date in sql server 
Sql :: postgres create extension if not exists 
Sql :: mysql on update current_timestamp 
Sql :: count column of tables psql 
Sql :: add column in sql server 
Sql :: run sql file in terminal 
Sql :: postgres get defined index in table 
Sql :: sql update table set text to lowercase 
Sql :: oracle show procedures 
Sql :: mysql count with if 
Sql :: sql current timestamp table 
Sql :: mysql update join 
Sql :: sql foreign key 
Sql :: python pandas df to postgres json table 
Sql :: how to create a sql database 
Sql :: update with select postgresql 
Sql :: 1396(hy00) mysql error 
Sql :: how to extract only year and month from date in sql 
Sql :: use group_concat in concat 
Sql :: date format mysql 
Sql :: creating postgresSQL database using the the shell 
Sql :: drop sequence 
Sql :: mysqldump with where clause 
Sql :: mysql age by birthdate 
Sql :: mysql get last 2 month data 
Sql :: mysql query with sql to get the next row 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =