1、%和_的区别:
一个“_”代表一个字符
“%”不区分
SELECT * FROM applic_sessions WHERE suggestion LIKE '%超%';
SELECT * FROM applic_sessions WHERE suggestion LIKE '_超_';
SELECT * FROM applic_sessions WHERE suggestion LIKE '____超_';
2、值与其他值相加仍然为null
3、为查询出来的数据创建视图,并取前三条记录:
CREATE VIEW applic_X AS ( SELECT * FROM applic_sessions a WHERE a.platform = 'web' ORDER BY a.start_time ASC);
SELECT * FROM applic_X LIMIT 0,3;
4、DROP TABLES IF EXISTS applic_X; 若存在表applic_X,即删除该表。
网友评论