


版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、select*from selectempno員,select*from selectempno員,enamefromempwhere員工n =?and=50and -表示集select*fromselect*fromempwheredeptno-滿足其一即createtableemp1ect*fromselect*from-模糊查 -% - 我只知道第三位為-like 用于模糊查-_ 表示一-% 表示任意一位 可以為0- 需要進(jìn)行轉(zhuǎn)-轉(zhuǎn)義 需要用到轉(zhuǎn)義字-通過 進(jìn)行轉(zhuǎn)義 select*fromemp1whereenamelikeA_%- 需要進(jìn)行轉(zhuǎn)-轉(zhuǎn)義 需要用到轉(zhuǎn)義字-通過 進(jìn)行轉(zhuǎn)義 se
2、lect*fromemp1whereenamelikeA_% nselect*fromemp1whereenamelikeAn_%-查詢job select*fromemp1wherejoblike%NN%-找出最后一 職select*fromemp1wherejoblike%N%N-查詢出第四位是 -的轉(zhuǎn)義 只能使用不需要使用es 進(jìn)行定義select*fromemp1whereenamelike - 顯示出一段話 CLARKs員是-| 作為連接字- 字符串或者列|字符串或者列 CLARKs是7782fromselectename|s是|empnoselectconcat(ename,s是)
3、|empnofromselectconcat(concat(ename,s是),empno-_ % 已經(jīng)被定義過了想要單純的顯示出 _from-查詢出 沒有mgrfrom-查詢出 沒有mgr 號(hào)的人 是- null 需要isselect*fromempwheremgrisnull select * from emp where mgr = nullselectDISTINCTdeptnofrom SELECT empno,ename,AND select * from emp order by empno, select*fromemporderbydeptno,empno查詢last_nam
4、e是Chen的員工的信息 select*fromwherehiredate9-7月-1997and select*fromwherelast_namelike a% 名升序排序select*fromwheredeptno50orderbysaldesc ,name6.查詢沒管理的員工(經(jīng)理號(hào)為空)的信息select*fromwherenotin(10,20,110) 5.查詢部門號(hào)為50號(hào)員工的信息,先按工資降序排序,再按姓select*fromempwheremgrisselect*fromempwheremgris7.查詢員工表中工資大于等于4500并且部門為50或者60的工(last_n
5、ame)、工資、部門號(hào)selectlast_name),工資,fromwhere工 資=4500 and (部門號(hào) in(50,60)-substr(字符串或者列名,開始的位數(shù)selectsubstr(ABC,1,2)fromselectsubstr(thisisasunnyday,5,7)from-問題顯示出第三位是A的員select*fromempwhere selectinstr(thisisoristhesuntodayis,is,5,2) from dualselectinstr(thisisoristhesuntodayis,is,5,1) from dualselectinstr
6、(thisisoristhesuntodayfrom-問題顯示出只有第三位是A的員select*fromempwhere substr(ename,3,1)=Aandselect*fromempwhereinstr(ename,A,1,1)=3andename not like %A%-TRIM(S FROM -去掉 首尾 的制定字-trim (要去掉的內(nèi)容 from-trim (要去掉的內(nèi)容 from 字符串或者列名selecttrim(tfromtodayisaabcdtbt)fromselecttrim(leadingtfromtodayisaabcdtbt)from -replace(
7、字符串或者列要替換的內(nèi)容,替換后的selectreplace(abc,b,d)fromdual select * from emp1-在update語句中 使單行函updateemp1setename=-trunc (數(shù)據(jù)源selecttrunc(124.35,1)from-selectmod(5,3)fromselecttrunc(125.35,-1)fromdual selecttrunc(125.35,-2)from-round(數(shù)據(jù)源,保留小數(shù)點(diǎn)后的位selectround(124.355,2)fromdual select round(124.35,0) from dual sele
8、ct round(124.35,1) from dual selectround(124.35,-1)fromdual selectround(125.35,-1)from-日期函-可以對(duì)日起進(jìn)行加減操但不能進(jìn)行乘-這里的1-日期函-可以對(duì)日起進(jìn)行加減操但不能進(jìn)行乘-這里的1 代表1天 即24小 -如果需要對(duì)分鐘 小時(shí)操作需要除以24 除以24代selectsysdatefromselectsysdate+1/24from-日期型函數(shù) 只能對(duì)日期進(jìn)行操- N:返回兩個(gè)日期間隔的月select-ADD_MONTHS:在指定日期基礎(chǔ)上加上相應(yīng)selectADD_MONTHS(sysdate,1)f
9、romselectADD_MONTHS(date2011-11-11,2)from-NEXT_DAY:返回某一日期的下一個(gè) -這里的1 代表的是每一周的第一天 你也可以寫成 星selectsysdate,NEXT_DAY(sysdate,1)fromselect一fromselect日from-LAST_DAY:返回指定日期當(dāng)月最后一天的日selectLAST_DAY(date2000-2-1) from-ROUND(date,fmt)對(duì)日期進(jìn)行指定格式的四舍五入操作selectsysdate+1fromdual selectsysdate-1from按照YEAR、MONTH、DAY等進(jìn)行四舍
10、五-遵從了 二按照YEAR、MONTH、DAY等進(jìn)行四舍五-遵從了 二分-對(duì)于 day進(jìn)行四舍五 每周三的 中午12點(diǎn) 天的 日期即本周的 周日的日期-每周周日一周的第一外國人標(biāo)準(zhǔn)-如果 獲取到的時(shí)間在 周三的12點(diǎn)之后 返回下周的第一 select sysdate,ROUND(sysdate,month) from dual selectsysdate,ROUND(date2015-9-15,month)fromselectsysdate,ROUND(date2015-9-16,month) select sysdate,ROUND(sysdate,year) from dual selectsysdate,ROUND(date2015-7-1,year)fromdualYEAR、MONTH、DAY等進(jìn)行截?cái)?。selectsysdate,ROUND(sysdate,day)fromselectsysdate,ROUND(date2015-9-14,day)fromdual selectsysdate,ROUND(date2015-9-21,day)fromdual selectsysdate,ROUND(date2
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 場(chǎng)地帳篷租賃合同范本
- 2021-2026年中國主蒸汽隔離閥市場(chǎng)全面調(diào)研及行業(yè)投資潛力預(yù)測(cè)報(bào)告
- 固定資產(chǎn)投資項(xiàng)目節(jié)能評(píng)估報(bào)告表
- 補(bǔ)簽建筑合同范本
- 焊盤和過孔的區(qū)別是什么
- 中國其他酒制造市場(chǎng)前景及投資研究報(bào)告
- 渠道招商合同范本
- 面向特定主題的開放式事件抽取關(guān)鍵技術(shù)研究
- 基于深度學(xué)習(xí)的偽造語音檢測(cè)算法研究
- 生命史策略對(duì)生育意愿的影響-性別偏見的中介和生育年齡限制感的調(diào)節(jié)作用
- 美甲藝術(shù)全套教學(xué)課件
- 中國古代餐具
- 施工日志模板
- Agilent7820A氣相色譜儀操作規(guī)程知識(shí)講解
- 加涅的信息加工理論-課件
- 400字作文稿紙(方格)A4打印模板
- 不領(lǐng)證的夫妻離婚協(xié)議書
- 鋁型材企業(yè)組織架構(gòu)及部門職能
- 華為BEM戰(zhàn)略解碼體系完整版
- Python商務(wù)數(shù)據(jù)分析與實(shí)戰(zhàn)PPT完整全套教學(xué)課件
- 利用“自然筆記”提高小學(xué)生科學(xué)素養(yǎng)獲獎(jiǎng)科研報(bào)告
評(píng)論
0/150
提交評(píng)論