Oracle基础
来源:互联网 发布:淘宝代销邮费算谁的 编辑:程序博客网 时间:2024/04/29 09:28
SQL
- 一种语言
- ANSI标准
- 关键字不能缩写
- 使用语句控制数据库中的表的定义信息和表中的数据
SQL PLUS
- 一种环境
- Oracle的特性之一
- 关键字可以缩写
- 命令不能改变数据库中数据的值
- 集中运行
- 常见命令:ed(edit) c(change)for(format) col(column)a(append,在上条命令上追加)
iSQL PLUS
- sql plus 的网页版(9i,10g中存在,因网络协议http原因,11g取消)
Oracle服务
- OracleOraDb11g_home1TNSListener 监听
- OracleServiceORCL oracle最核心的服务,占用内存高,将其调为手动启动模式
- OracleJobScheduler 任务调度器
- OracleDBConsoleorcl 1158端口 企业管理器监听
常用命令
- show user 查询当前用户
- select * from tab; 查询当前用户下的表
- spool off 录屏,存储为 .txt 文件
- host cls 清屏
- desc emp 描述emp表结构
- rollback 回滚
- commit 提交
别名
如果别名中存在特殊字符/关键字,则命令报错
别名中 as ,”“, ”都可以省略,但是中间不能加特殊字符(空格。。。),关键字
select empno,ename,job,mgr,sal as "月 薪",sal*12 "年薪",sal*12+nvl(comm,0) 年 收select入 from emp;
ORA-00923: 未找到预期 FROM 关键字 00923. 00000 - “FROM keyword not found where expected”
dual表
当操作与任何表都没关系时,oracle提供特殊的表 dual
select 3+2 from dual;select sysdate from dual;
0 0
- oracle基础
- Oracle基础
- oracle基础
- Oracle基础
- oracle基础
- Oracle 基础
- oracle 基础
- Oracle基础
- oracle基础
- oracle基础
- oracle基础
- oracle基础
- Oracle 基础
- Oracle基础
- oracle基础
- oracle基础
- Oracle基础
- Oracle基础
- 解决ssh访问linux虚拟机特别慢
- JobReview 2016/3/25
- MiniU 的应用
- 编译过程中运行库选择
- ADS简单程序编译分析(2)
- Oracle基础
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- stl中string作为成员变量引起的core问题
- iOS开发基础 - UITableView
- python常用函数(zip,map,filter,reduce)
- 50个程序猿笑话
- iOS开发基础 - UISearchController
- pssh使用指南
- 【开源框架】EventBus 消息总线使用