摘要:
最近在整理项目,发现学习到了很多知识,以后要把我遇到的sql语句都记录下来: 1、Upper() 功能将字符串中的小写字母转换为大写字母 2、排序 select * from 表名 order by 列名 desc其中desc是降序asc是升序(默认升序排列,可以不写) 3、根据主键更新数据库(总是 阅读全文
摘要:
在select语句中(+)指的是外连接,是连接查询的一种方法。例:select t1.*,t2.* from dept t1,emp t2 where t1.deptno=t2.deptno(+);其中:t1.deptno=t2.deptno(+)代表意思是,即使t2(emp表)中不存在匹配的记录, 阅读全文