Oracle11g Rac创建数据库语句和其细节.docVIP

  • 18
  • 0
  • 约6.57千字
  • 约 5页
  • 2017-06-03 发布于湖北
  • 举报
登录数据库 sqlplus username/password ORACLE_SID(环境变量) 数据库对应的实例的名字,该名字决定了连接哪个具 体的数据库 show user 查看当前用户 desc tablename 查看表结构 desc describe的缩写 查询员工的姓名,和工资 select first_name,salary from s_emp; 查询员工的名字和职位 select first_name,title from s_emp; edit 修改sql语句 l 查看 /运行 select * from s_dept; 列出部门表的所有信息 列出每个员工的年薪 select first_name,salary*12 from s_emp; 列出每个员工的总收入 select first_name,salary*12*(1+commission_pct/100) tol sal from s_emp; 空值会导致算术表达式为空,Oracle认为null为无穷大 select first_name,salary*12*(1+nvl(commission_pct,0)/100) tol_sal, Commission_pct from s_emp nvl(p1,p2) if(p1 is null) then return p2; else return p1; c

文档评论(0)

1亿VIP精品文档

相关文档