freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

語法歸納五篇(編輯修改稿)

2024-10-13 18:43 本頁面
 

【文章內(nèi)容簡介】 d=1 where cid=8。drop table stuInfo。要先刪除這個 drop table classInfo。再刪除這個delete classInfo where cid=4。同時刪除這兩個表中的4刪除用戶的時候drop user yc1 [cascade]刪除用戶的同時把它創(chuàng)建的對象都一起刪除修改表添加表中字段alter table 表名 add 字段名 類型alter table classInfo add status varchar2(10)default 39。未畢業(yè)39。修改已有字段的數(shù)據(jù)類型alter table 表名 modify 字段名 類型 alter table classInfo modify status number(1)修改字段名alter table 表名 rename column 舊字段名 to 新的字段名 alter table classInfo rename column ame to 班級名。刪除字段alter table 表名 drop column 字段名 alter table classInfo drop column status。修改表名rename 舊表名 to 新表名 rename classInfo to 班級信息;刪除表截斷表效率高,每刪除一次會產(chǎn)生一次日志截斷會釋放空間,而delete不會釋放空間刪除表結(jié)構(gòu)和數(shù)據(jù) drop table 表名;刪除表中所有數(shù)據(jù) truncate table classInfo。delete classInfo。create table classInfo(cid int primary key,班級id ame varchar2(20)not null unique ,班級名 stasuts varchar2(100))。select *from classInfo。數(shù)據(jù)的操作增加數(shù)據(jù)語法insert into 表名[(列名,....)] values(對應(yīng)的數(shù)據(jù)的值);insert into classInfo values(1,39。一班39。,39。未畢業(yè)39。)。需要按照表結(jié)構(gòu)的順序插入 insert into classInfo values(4,39。六班39。,39。未畢業(yè)39。)。insert into classInfo(ame,cid)values(39。二班39。,2)。需要按照括號中的順序插入,但是 not null primary key 必須插入的。insert into classInfo(ame,cid)values(39。三班39。,3)。刪除的語法delete 表名 [where 條件] delete classInfo where cid=2。修改記錄的語法update 表名 set [字段=39。值39。 ] [where 條件] update classInfo set ame=39。三班39。會修改所有該字段 update classInfo set ame=39。四班39。 where cid=1。update classInfo set ame=39。五班39。, stasuts =39。未畢業(yè)39。 where cid=3。alter table classInfo drop constraint SYS_C0011213。添加多個時可以使用序列用序列來做自動增長create sequence seq_classInfo_cid start with 1001 increment by 1。insert into classInfo values(,39。七班39。,39。未畢業(yè)39。)。insert into classInfo values(,39。八班39。,39。未畢業(yè)39。)。insert into classInfo values(,39。九班39。,39。未畢業(yè)39。)。insert into classInfo values(,39。十班39。,39。未畢業(yè)39。)。create table classInfo2(cid int primary key,班級id ame varchar2(20)not null unique ,班級名 stasuts varchar2(100))。select *from classInfo2。drop table classInfo2。insert into classInfo2 select *from classInfo。insert into classInfo(ame,cid)select ame,cid from classInfo。alter table classInfo2 drop constraint SYS_C0011213。select from dual。select from dual。直接創(chuàng)建一個新表,并拿到另一個表其中的數(shù)據(jù) create table newTable as select ame,cid from classInfo。create table newTable1 as select *from classInfo。select *from newTable。select *from newTable1。insert into newTable1 values(1008,39。dg39。,39。39。)。直接在使用scott登陸,進(jìn)行查詢操作簡單查詢select *from emp。select empno as id,ename as name from emp。select empno 編號,ename 姓名 from emp。去除重復(fù)select job from emp。select distinct job from emp。select job,deptno from emp。select distinct job,deptno from emp。字符串的連接select 39。員工編號是39。 ||empno || 39。姓名是39。 ||ename ||39。工作是39。||job from emp。乘法select ename,sal *12 from emp。加減乘除都類似限定查詢獎金大于1500的select *from emp where sal1500。有獎金的select *from emp where m is not null。沒有獎金的select *from emp where m is null。有獎金且大于1500的select *from emp where sal1500 and m is not null。工資大于1500或者有獎金的select *from emp where sal1500 or m is not null。工資不大于1500且沒獎金的select *from emp where sal1500 or m is not null)。工資大于1500但是小于3000的select *from emp where sal1500 and sal時間區(qū)間select *from emp where hiredate between to_date(39。1981010139。,39。yyyyMMdd39。)and to_date(39。1981123139。,39。yyyyMMdd39。)。查詢雇員名字select *from emp where ename=39。SMITH39。查詢員工編號select *from emp where empno=7369 or empno=7499 or empno=7521。select *from emp where empno in(7369,7499,7521)。select *from emp where empno not in(7369,7499,7521)。排除這3個,其他的都可以查模糊查詢select *from emp where ename like 39。_M%39。第2個字母為M的 select *from emp where ename like 39。%M%39。select *from emp where ename like 39。%%39。全查詢不等號的用法select * from emp where empno!=7369。select *from emp where empno 7369。對結(jié)果集排序查詢工資從低到高select *from emp order by sal asc。select *from emp order by sal desc,hiredate desc。asc 當(dāng)導(dǎo)游列相同時就按第二個來排序字符函數(shù)select *from dual。偽表 select 2*3 from dual。select sysdate from dual。變成大寫select upper(39。smith39。)from dual。變成小寫select lower(39。SMITH39。)from dual。首字母大寫select initcap(39。smith39。)from dual。連接字符串select concat(39。jr39。,39。smith39。)from dual。只能在oracle中使用 select 39。jr39。 ||39。smith39。 from dual。推薦使用截取字符串select substr(39。hello39。,1,3)from dual。索引從1開始獲取字符串長度 select length(39。hello39。)from dual。字符串替換select replace(39。hello39。,39。l39。,39。x39。)from dual。把l替換為x通用函數(shù)數(shù)值函數(shù)四舍五入select round()from dual。取整的四舍五入 12 select round(,2)from dual。保留2位小數(shù) select trunc()from dual。取整select trunc(,2)from dual。保留2位小數(shù)取余select mod(10,3)from dual。10/3取余 =1日期函數(shù)日期數(shù)字=日期 日期+數(shù)字=日期 日期日期=數(shù)字查詢員工進(jìn)入公司的周數(shù)select ename,round((sysdatehiredate)/7)weeks from emp。查詢所有員工進(jìn)入公司的月數(shù)select ename,round(months_between(sysdate,hiredate))months from emp。求三個月后的日期select add_months(sysdate,6)from dual。select next_day(sysdate,39。星期一39。)from dual。下星期 select last_day(sysdate)from dual。本月最后一天select last_day(to_date(39。199712339。,39。yyyyMMdd39。))from dual。轉(zhuǎn)換函數(shù) select ename , to_char(hiredate,39。yyyy39。)年,to_char(hiredate,39。mm39。)月,to_char(hiredate,39。dd39。)日 from emp。select to_char(10000000,39。$999,999,99939。)from emp。select to_number(39。2039。)+to_number(39。8039。)from dual。數(shù)字相加查詢員工年薪select ename,(sal*12+nvl(m,0))yearsal from emp??蘸腿魏螖?shù)計算都是空Decode函數(shù),類似if else if(常用)select decode(1,1,39。one39。,2,39。two39。,39。no name39。)from dual。查詢所有職位的中文名 select ename, decode(job, 39。CLERK39。, 39。業(yè)務(wù)員39。, 39。SALESMAN39。, 39。銷售39。, 39。MANAGER39。, 39。經(jīng)理39。, 39。ANALYST39。, 39。分析員39。, 39。PRESIDENT39。, 39。總裁39。, 39。無業(yè)39。)from emp。select ename, case when job = 39。CLERK39。 then 39。業(yè)務(wù)員39。 when job = 39。SALESMAN39。 then 39。銷售39。 when job = 39。MANAGER39。 then 39。經(jīng)理39。 when job = 39。ANALYST39。 then 39。分析員39。 when job = 39。PRESIDENT39。 then 39??偛?9。 else 39。無業(yè)39。 end from emp。多表查詢select *from dept。select *from emp,dept order by 。select *from emp e,dept d where =。select e.*, from emp e,dept d where =。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1