Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql show table structure

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

mysql show table fields

DESCRIBE my_table;
Comment

mysql show tables

mysql -e 'show tables;' database_name
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 select date add day 
Sql :: declare table variable sql 
Sql :: NVL() Functions 
Sql :: update in sql server table 
Sql :: mysql how to use FIND_IN_SET function in WHERE clause ? 
Sql :: postgres order by month 
Sql :: @firebase/database: FIREBASE WARNING: update at /users failed: permission_denied 
Sql :: insert into auto increment mysql 
Sql :: command to give readonly access to a postgres sql user 
Sql :: mysql add columns 
Sql :: exec procedure pl sql 
Sql :: change permission to database mysql 
Sql :: add column in table 
Sql :: import mysql database command line linux 
Sql :: tablas bootstrap responsive sql server para datos vivos 
Sql :: default value false mysql 
Sql :: mysql if statement 
Sql :: ERROR 1064 (42000) 
Sql :: sql stored procedure with table parameter 
Sql :: dbms_metadata.get_ddl table 
Sql :: oracle show error line number 
Sql :: mysql add hours to time field 
Sql :: redo files log oracle 
Sql :: mysql updating multiple column values from array variable 
Sql :: how-to-remove-mysql-root-password 
Sql :: copy a table mysql 
Sql :: mysql if statement in where clause 
Sql :: how to find max and min salary in sql 
Sql :: SQL Server OPENQUERY WITH result SETS 
Sql :: sql server python connection 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =