随笔分类 -  数据库

摘要:select 1<=>null select null<=>null SELECT null = null <=>是安全等于的意思,第一条SQL返回0,第二条SQL返回1,第三条SQL返回null 阅读全文
posted @ 2018-09-18 09:22 danawill 阅读(512) 评论(0) 推荐(0)
摘要:https://www.2cto.com/database/201503/380348.html 阅读全文
posted @ 2018-03-22 13:57 danawill 阅读(84) 评论(0) 推荐(0)
摘要:create table test( id int(10) unsigned not null auto_increment, name varchar(10) character set utf8, age int(10),primary key(id)) engine=MyISAM create 阅读全文
posted @ 2017-11-11 16:24 danawill 阅读(922) 评论(0) 推荐(0)
摘要:select empno,ename,r from (select empno,ename,rownum r from emp) where r4 select empno,ename,r from (select empno,ename,rownum r from emp where rownum4 阅读全文
posted @ 2017-08-26 21:01 danawill 阅读(395) 评论(0) 推荐(0)
摘要:使用groupby对查询解结果进行分组时,要把需要分组的字段写在最前面 正确的分组语句 SELECT id,sectionOfficeId,doctorName FROM doctor GROUP BY sectionOfficeId,id,doctorName 错误的分组语句 SELECT * F 阅读全文
posted @ 2017-08-03 21:37 danawill 阅读(125) 评论(0) 推荐(0)