512
by Brian Aker
Adding back more test cases. |
1 |
select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5),-(1+1)*-2;
|
2 |
1+1 1-1 1+1*2 8/5 8%5 mod(8,5) mod(8,5) -(1+1)*-2
|
|
1
by brian
clean slate |
3 |
2 0 3 1.6000 3 3 3 4
|
512
by Brian Aker
Adding back more test cases. |
4 |
explain extended select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5),-(1+1)*-2;
|
5 |
id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
6 |
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
7 |
Warnings:
|
|
8 |
Note 1003 select (1 + 1) AS `1+1`,(1 - 1) AS `1-1`,(1 + (1 * 2)) AS `1+1*2`,(8 / 5) AS `8/5`,(8 % 5) AS `8%5`,(8 % 5) AS `mod(8,5)`,(8 % 5) AS `mod(8,5)`,(-((1 + 1)) * -(2)) AS `-(1+1)*-2`
|
|
1
by brian
clean slate |
9 |
drop table if exists t1,t2;
|
10 |
create table t1(a int);
|
|
11 |
create table t2(a int, b int);
|
|
12 |
insert into t1 values (1), (2), (3);
|
|
13 |
insert into t2 values (1, 7), (3, 7);
|
|
512
by Brian Aker
Adding back more test cases. |
14 |
select t1.a, t2.a, t2.b from t1 left join t2 on t1.a=t2.a;
|
15 |
a a b
|
|
16 |
1 1 7
|
|
17 |
2 NULL NULL
|
|
18 |
3 3 7
|
|
1
by brian
clean slate |
19 |
drop table t1, t2;
|