摘要: 无条件为真 为假 别名不能直接用来当做查询来用 只能如此 下面这些语句是可以使用的,使用的是排序规则 阅读全文
posted @ 2016-08-22 23:59 叨客人 阅读(142) 评论(0) 推荐(0) 编辑
摘要: varchar2(6) 张三 --在jbk中是两个字节,在utm中是三个字节char(6) 张 三 --可以确定长度的用charclob --大存储,没事少用,当多余4000字节时,会用lob来存储,效率变低 number 100.123 --精度为6(整数加小数),number的精度为38numb 阅读全文
posted @ 2016-08-22 23:26 叨客人 阅读(454) 评论(0) 推荐(0) 编辑
摘要: --重复行select department_id from employees; select distinct department_id from employees; select distinct department_id,job_id from employees; 只有当110 AC 阅读全文
posted @ 2016-08-22 23:21 叨客人 阅读(132) 评论(0) 推荐(0) 编辑
摘要: || 在Java中是或的意思,但在Oracle中是拼接的意思 --拼接字符串select 'Hello'||'world' from dual;select 'Hello'||'1234'from dual;select '123'||999 from dual; select '100'+'200 阅读全文
posted @ 2016-08-22 23:07 叨客人 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 给列起别名的两种方式 AS别名 空格别名 select employee_id,last name,salary,salary*1.25 as new_sal from employee; select employee_id,last name,salary,salary*1.25 new_sal 阅读全文
posted @ 2016-08-22 22:53 叨客人 阅读(248) 评论(0) 推荐(0) 编辑
摘要: select * |{[DISTINCT] column |expression [alias],...} from table; --虚表(dual) select 5+3,5-3,5*3,5/2 from dual; select 'Hello World',100 from dual; sal 阅读全文
posted @ 2016-08-22 22:31 叨客人 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 登陆服务器 除了 sys 用户登陆之外,其他都都选Normal 新建sql 窗口 编写执行sql语句 设置字体、颜色 工具——首选项——用户界面——字体——选择 工具——首选项——用户界面——编辑器——选择 格式化sql语句 plssql 工具sql美化器(此工具可以从网上下载) 放入路径之后点击编 阅读全文
posted @ 2016-08-22 01:03 叨客人 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 显示当前的所有数据库表 select table_name from user_table; select table_name from tabs; 执行外部SQL文件 在SQLPLUS下执行@命令 示例@d:\data.sql(将文件拖进去) 阅读全文
posted @ 2016-08-22 00:06 叨客人 阅读(361) 评论(0) 推荐(0) 编辑