- 1、本文档共22页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
oracle入门经典(单表操作)(国外英文资料)
oracle入门经典(单表操作)
/ *
The following code displays the width Settings for the emp table
* /
Col empno for 9999;
Col ename a10 for;
A10 col job for;
Col MGR for 9999;
Col hiredate for a12.
Col sal for 9999;
Col comm for 9999;
Col deptno for 99;
The set pagesize 20;
Query all the tables for Scott users
Select * from TAB.
Query the current user
Show the user;
Set the display width (character), 10 characters width
Col tname a10 for;
Execute the latest SQL statement, not the SQLPLUS command
/
Clear the screen
The host CLS.
Query the structure of the emp table
Desc emp;
Query all the contents of the emp table
Select * from emp;
Set the column width (numeric) of the display, 9 represents the numeric type, a 9 represents a number bit, and four 9 represents the four digit bits
Col empno for 9999;
Set the 20 records in a page
The set pagesize 20;
Query emp table employee number, name, salary, department number
Select empno, ename, sal, deptno from emp;
Query the unduplicated work of the emp table
Select distinct job from emp;
Query the employees number, name, salary, annual salary
Select empno, ename, sal, sal * 12 from emp;
Modify the previous SQL statement
Edit;
Query the employees number, name, salary, annual salary, annual salary (annual salary + bonus available)
Select empno, ename, sal, sal * 12, sal * 12 + comm from emp;
To solve the null problem, use the NVL () function
Select empno, ename, sal, from emp.
NVL (a, b) : if a is empty, substitute b
Select empno, ename, sal, sal * 12, sal * 12 + NVL.
Use aliases to query employee Numbers, names, monthly salary, annual salary, annual salary (annual salary + bonus)
Select empno as number, ename as name, sal as salary, sal * 12 as annual salary, sal * 12 + NVL (comm, 0) as annual income from emp;
Select empno number, ename name, sal salary, sal * 12 annual salary, sal * 12 + NVL (comm, 0) year of income from emp;
Select empno number, ename name, sal monthly salary, sal * 12 + NVL (comm, 0) annual income.
Advocate the use of
您可能关注的文档
- 2011初中生转化技巧.ppt(国外英文资料).doc
- 2011年6月英语四级测验五大制胜尽招(国外英文资料).doc
- 2011届高考英语一轮温习单位专题配套精练:必修5 Unit 4(国外英文资料).doc
- 2011年普通高等学校招生全国统一考试(浙江卷)(国外英文资料).doc
- 2011电大职业技能实训中级会计(二)题目及答案(国外英文资料).doc
- 2011江苏高考语文谜底(国外英文资料).doc
- 2012八年级暑假作业答案(国外英文资料).doc
- 2010年4月份资产评估试卷及答案(国外英文资料).doc
- 2010中考语文(连云港)(国外英文资料).doc
- 2010全国语文高测验题谜底(国外英文资料).doc
- 中国行业标准 GM/T 0126-2023HTML密码应用置标语法.pdf
- 《JJF 2121-2024恒转速源校准规范》.pdf
- 餐饮服务中20条处理要点.docx
- 《GM/T 0011-2023可信计算 可信密码支撑平台功能与接口规范》.pdf
- 《JJF 2134-2024旋转流变仪校准规范》.pdf
- JJF 2121-2024恒转速源校准规范.pdf
- 计量规程规范 JJF 2121-2024恒转速源校准规范.pdf
- 《JJF 2118-2024压力式六氟化硫气体密度控制器校验仪校准规范》.pdf
- JJF 2134-2024旋转流变仪校准规范.pdf
- 计量规程规范 JJF 2134-2024旋转流变仪校准规范.pdf
最近下载
- 2024年高考地理新课标卷试题答案解析及备考指导课件.pdf
- 铸牢中华民族共同体意识-考试复习题库(含答案).docx VIP
- 2024年党纪学习教育ppt(党课).pptx VIP
- 至为芯科技多串锂电池充放电芯片IP5389 datasheet_cn_v1.02(1)(2).pdf
- 2024年四川凉山昭觉县事业单位招聘60人历年公开引进高层次人才和急需紧缺人才笔试参考题库(共500题)答案详解版.docx
- 全国托育大赛中职组(教师)备赛复习试题附答案.doc
- 金匮要略的基础知识点总结(考试必备).doc VIP
- 爱在日落黄昏时Before.Sunset.2004中英表格台词剧本.pdf
- PADI开放水域潜水员理论考试A卷.docx
- 项目经理考核细则.docx
文档评论(0)