1
drop table if exists test;
2
create table test(a int,b int primary key);
3
insert into test values(1,1);
4
insert into test values(1,2);
5
insert into test values(1,3);
6
insert into test values(1,4);
13
explain select * from test;
14
desc select * from test;
15
describe select * from test;
16
explain insert into test values(1,5);
17
desc insert into test values(1,5);
18
describe insert into test values(1,5);
19
explain insert into test values(1,4);
20
desc insert into test values(1,4);
21
describe insert into test values(1,4);
22
explain update test set a=2 where b=2;
23
desc update test set a=2 where b=2;
24
describe update test set a=2 where b=2;
25
explain update test set b=2 where a=1;
26
desc update test set b=2 where a=1;
27
describe update test set b=2 where a=1;
28
explain delete from test where b=5;
29
desc delete from test where b=5;
30
describe delete from test where b=5;
31
explain create table test(a int,b int primary key);
32
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'create table test(a int,b int primary key)' at line 1
33
desc create table test(a int,b int primary key);
34
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'create table test(a int,b int primary key)' at line 1
35
describe create table test(a int,b int primary key);
36
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'create table test(a int,b int primary key)' at line 1
37
explain drop table test;
38
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'drop table test' at line 1
40
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'drop table test' at line 1
41
describe drop table test;
42
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'drop table test' at line 1
43
drop table if exists sd;
44
create table sd(a int);
45
insert into sd values(5),(4),(4),(3),(2),(2),(2),(1);
46
explain select @rownum := @rownum + 1 as row, @rank := IF(@prev_score!=a, @rownum, @rank) as rank, @prev_score := a as score from sd;
47
explain outline select 1 < '2009-12-17 06:03:17';
49
==========================================
50
|ID|OPERATOR |NAME|EST.ROWS|EST.TIME(us)|
51
------------------------------------------
52
|0 |EXPRESSION| |1 |1 |
53
==========================================
55
-------------------------------------
56
0 - output([cast(1, DECIMAL(1, 0)) < cast('2009-12-17 06:03:17', DECIMAL(1, -1))]), filter(nil)
57
values({cast(1, DECIMAL(1, 0)) < cast('2009-12-17 06:03:17', DECIMAL(1, -1))})
59
-------------------------------------
62
OPTIMIZER_FEATURES_ENABLE('')