【正文】
ere 條件。table_name39。)0。統(tǒng)計(jì)分析數(shù)據(jù)庫的視圖 賦于oem_monitor權(quán)限非DBA用戶也可查詢V$*視圖SQL select * from dictionary where instr(ments,39。SQL DROP SYNONYM s_dept。用子查詢方式建立的表,只有非空NOT NULL的約束條件能繼承過來, ,可以用alter table add constraint ……再建立其它的約束條件,如primary Key的可選參數(shù)ON DELETE CASCADE 在創(chuàng)建Foreign Key時(shí)可以加可選參數(shù): ON DELETE CASCADE它的含義是如果刪除外鍵主表里的內(nèi)容, DELETE CASCADE參數(shù),子表里有內(nèi)容, SQL CREATE SYNONYM d_sum 2 FOR dept_sum_vu。SQL CREATE TABLE A as select * from B where 1=2。, 1, 20)//只顯示大于4個(gè)人的部門信息select deptno, count(*)from emp group by deptno having count(deptno) 4 /創(chuàng)建表1 查詢 員工號(hào) 姓名 月薪 年薪 年收入 部門名稱select , , , *12 yearsal,(*12+nvl(,0))ining , from emp e, dept d where = ====2 創(chuàng)建一個(gè)表, 把第一步驟查詢的信息,存放在另外一張表中 create table s1 as(select , , , *12 yearsal,(*12+nvl(,0))ining , from emp e, dept d where = )create view myview1 as(select , , , *12 yearsal,(*12+nvl(,0))ining , from emp e, dept d where = )create table empine asselect , , , *12 annalsal, sal*12+nvl(m, 0)ine, from emp e, dept d where = 。, 39。求各部門的平均薪水select deptno, avg(sal)from emp group by deptno==