oceanbase

Форк
0
166 строк · 2.9 Кб
1
can't determine a row
2
drop table if exists t1;
3
create table t1(c1 int, c2 int, primary key(c1));
4
insert into t1 values(1,1),(2,2),(3,3);
5
delete from t1 where c1 in(1);
6
select * from t1;
7
c1	c2
8
2	2
9
3	3
10
delete from t1 where c1 in(1,2);
11
select * from t1;
12
c1	c2
13
3	3
14
delete from t1 where c1>=3;
15
select * from t1;
16
c1	c2
17
insert into t1 values(1,1),(2,2),(3,3);
18
delete from t1 where c1<=1;
19
select * from t1;
20
c1	c2
21
2	2
22
3	3
23
delete from t1 where 1>=c1;
24
select * from t1;
25
c1	c2
26
2	2
27
3	3
28
delete from t1 where 3<=c1;
29
select * from t1;
30
c1	c2
31
2	2
32
delete from t1 where 2<=c1;
33
select * from t1;
34
c1	c2
35
insert into t1 values(1,1),(2,2),(3,3);
36
delete from t1 where c1>1 and c1<3;
37
select * from t1;
38
c1	c2
39
1	1
40
3	3
41
delete from t1 where c1=1 or c1=2;
42
select * from t1;
43
c1	c2
44
3	3
45
delete from t1 where c1<1 or c1<2;
46
select * from t1;
47
c1	c2
48
3	3
49
delete from t1 where c1=1 and c1=2;
50
select * from t1;
51
c1	c2
52
3	3
53
delete from t1 where c1>1 and c1=2;
54
select * from t1;
55
c1	c2
56
3	3
57
drop table if exists t1;
58
create table t1(c1 int, c2 int, primary key(c1));
59
insert into t1 values(1,1),(2,2),(3,3);
60
delete from t1 where c2 in(1);
61
select * from t1;
62
c1	c2
63
2	2
64
3	3
65
delete from t1 where c2 in(1,2);
66
select * from t1;
67
c1	c2
68
3	3
69
delete from t1 where c2>=3;
70
select * from t1;
71
c1	c2
72
insert into t1 values(1,1),(2,2),(3,3);
73
delete from t1 where c2<=1;
74
select * from t1;
75
c1	c2
76
2	2
77
3	3
78
delete from t1 where 1>=c2;
79
select * from t1;
80
c1	c2
81
2	2
82
3	3
83
delete from t1 where 3<=c2;
84
select * from t1;
85
c1	c2
86
2	2
87
delete from t1 where c2>1 and c2<3;
88
select * from t1;
89
c1	c2
90
delete from t1 where c2=1 or c2=2;
91
select * from t1;
92
c1	c2
93
delete from t1 where c2<1 or c2<2;
94
select * from t1;
95
c1	c2
96
delete from t1 where c2=1 and c2=2;
97
select * from t1;
98
c1	c2
99
delete from t1 where c2>1 and c2=2;
100
select * from t1;
101
c1	c2
102
drop table if exists t1;
103
create table t1(c1 int, c2 int, primary key(c1));
104
insert into t1 values(1,1),(2,2),(3,3);
105
delete from t1 where (c1,c2) in((1,1));
106
select * from t1;
107
c1	c2
108
2	2
109
3	3
110
delete from t1 where (c1,c2) in((1,1),(2,2));
111
select * from t1;
112
c1	c2
113
3	3
114
delete from t1 where (c2,c1) in((1,1));
115
select * from t1;
116
c1	c2
117
3	3
118
delete from t1 where (c2,c1) in((1,1),(2,2));
119
select * from t1;
120
c1	c2
121
3	3
122
delete from t1 where c1 > 1 and c2 >10 and c1=1;
123
select * from t1;
124
c1	c2
125
3	3
126
delete from t1 where c1 > 1 or c2 >10 and c1=1;
127
select * from t1;
128
c1	c2
129
drop table if exists t1;
130
create table t1(c1 int, c2 int, primary key(c1));
131
insert into t1 values(1,1),(2,2),(3,3);
132
delete from t1 where c2<=1;
133
select * from t1;
134
c1	c2
135
2	2
136
3	3
137
delete from t1 where 1>=c2;
138
select * from t1;
139
c1	c2
140
2	2
141
3	3
142
delete from t1 where 3<=c2;
143
select * from t1;
144
c1	c2
145
2	2
146
delete from t1 where c2>1 and c2<3;
147
select * from t1;
148
c1	c2
149
insert into t1 values(1,1),(2,2),(3,3);
150
delete from t1 where c2=1 or c2=2;
151
select * from t1;
152
c1	c2
153
3	3
154
delete from t1 where c2<1 or c2<2;
155
select * from t1;
156
c1	c2
157
3	3
158
delete from t1 where c2=1 and c2=2;
159
select * from t1;
160
c1	c2
161
3	3
162
delete from t1 where c2>1 and c2=2;
163
select * from t1;
164
c1	c2
165
3	3
166
drop table if exists t1;
167

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.