摘要: //数据库更新操作----------------------------------------------------------------------------------------------------------//将表结构及数据完成的复制出来create table myemp as select * from emp;select * from myemp where empno=7899;//添加数据-------------------------------------------------------------------------------------- 阅读全文
posted @ 2012-11-26 15:12 zhangze 阅读(224) 评论(0) 推荐(0)
摘要: select * from emp,dept where EMP.DEPTNO=DEPT.DEPTNO;select E.ENAME 姓名,E.JOB 工作职位, E1.ENAME 领导,D.DNAME 部门 from emp e ,emp e1,dept d where E.MGR=E1.EMPNO and E.DEPTNO=D.DEPTNO and E1.DEPTNO=D.DEPTNO;select E1.ENAME 姓名,E1.SAL 工资, D.DNAME 部门, decode(S.GRADE,1,'第五... 阅读全文
posted @ 2012-11-26 15:10 zhangze 阅读(188) 评论(0) 推荐(0)
摘要: //distinct 消去重复记录select distinct class_id from NEWS;//count() 统计记录数select count(distinct class_id) from NEWS;//concat('','') 或 || 连接字符串select '新闻标题:' || title 新闻标题 , concat( '新闻内容:' , content) 新闻内容 from News;//between...and...select * from NEWS where to_char(PUBDATE,& 阅读全文
posted @ 2012-11-26 15:07 zhangze 阅读(226) 评论(0) 推荐(0)