唐僧还在拜佛求经路。  

select * from scott.dept;            /查看scott.dept表中的全局信息。
        describe    scott.emp;            /查看scott.dept表详细信息。
        select ename from scott.dept;        /查看scott.dept表已dname显示出列。
        select enmae,sal from scott.emp;    /查看scott.emp表中所有人的姓名和工资。
        select ename,sal*12 “一年工资” from scott.emp; /查看scott.emp表中所有人的姓名和工资并乘12,并且加上名称。
        select deptno from scott.emp;         /显示部门的编号
        select DISTINCT deptno from scott.emp;/显示部门的编号并且不重复。
        select ename,job from scott.emp;      /显示scott.emp表中所有人名字和工作类型。
        select ename || ' ' ||job from scott.emp; /查看scott.emp表,结果是:SMITH CLARK 名字和工作在一行显示,并且名字也有变化。
        select ename || ‘工资’ || sal from scott.tmp;/查看scott.tmp表中的姓名-工资-金额#工资是夹在中间的别名。
      select ‘编号:’ || empno || ‘,姓名: ’ || ename form scott.emp;    /结果:编号:7369,姓名:SMITH
        select ename || ‘工资’ || sal || '.' from scott.tmp;/查看scott.tmp表中的姓名-工资-金额。#工资是夹在中间的别名。

posted on 2017-10-04 10:22  唐僧还在拜佛求经路。  阅读(274)  评论(0编辑  收藏  举报