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
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
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`
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);
14
select t1.a, t2.a, t2.b from t1 left join t2 on t1.a=t2.a;