Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 611 Bytes

3.7_Utility_Statements.md

File metadata and controls

53 lines (40 loc) · 611 Bytes

3.7 Utility Statements

3.7.1 USE

USE db_name

例:

use TESTDB;

3.7.2 EXPLAIN

EXPLAIN explainable_stmt

 SELECT statement
| DELETE statement
| INSERT statement
| REPLACE statement
| UPDATE statement

注意事项:

INSERT中表不能为自增序列表
例:

explain SELECT select * from a_test where id=1;

3.7.3 EXPLAIN2

EXPLAIN2 DATANODE=node_name sql=sql_stmt

例:

explain2 datanode=dn2 sql=select * from a_test where id=1;

3.7.4 DESC

{DESCRIBE | DESC} tbl_name [col_name | wild]

例:

DESC a_test id;