Oralce
惊蛰__
这个作者很懒,什么都没留下…
展开
-
Oracle笔记(2)
1.查询emp表中的所有信息,日期类型数据转换为”xxxx年xx月xx日”型。 select empno,ename,job,mgr,to_char(hiredate,‘yyyy"年"mm"月"dd"日"’) as 日期,sal,comm,deptno from emp; 2.查询所有员工信息并按照部门编号和工资进行排序 select * from emp order by deptno,sal ; 3.显示EMP表的员工姓名以及工资和奖金的和。 select ename,sal+nvl(comm,0) a原创 2020-06-13 17:31:09 · 470 阅读 · 0 评论 -
Oracle笔记(1)
1.//创建表空间 Create tablespace spacename datafile ‘/桌面/新建文件夹/demo.dbf’size 200m next 50m maxsize 1024m autoextend on(自动增长); 2.//建立用户 Create user hello identified by password; 3.//授权: grant connect,select,resource on table to hello; hello可以将select权限授予到user1 gr原创 2020-06-13 17:30:37 · 255 阅读 · 0 评论