基于Oracle的SQL语句备忘
来源:互联网 发布:linux 音乐服务器 编辑:程序博客网 时间:2024/05/08 22:33
1. 请注意运算符的优先级,情况复杂的,多用括号以明晰逻辑。
Notice: precedence of operator! Please don't stint '(' and ')' if you can't clarify the situation.
2. 需要根据某字段为空来查询记录:
Select condition: some section value is null in some table
select * from table_x t where t.section_a is null;
3. 修改表中记录:
Update some record in some table:
update table_x set section_a = 'XXX' , section_b = 'YYY' where section_c = 'ZZZ';
4. 删除表中记录:
Delete some record(s) in a table:
delete table_x where section_a = 'XXX';
5. nvl函数,其作用是:如果第一个参数为空值,则返回第二个参数的值,否则返回第一个参数的值。
Function 'nvl': If the first parameter is null, the second para as the return value; else return the first parameter.
6. 在执行一了些数据插入或删除之后,与MS SQL Server不同,Oracle中需要提交刚才执行的结果(可通过 commit; 语句实现)。
7. psu.end_date is null or psu.end_date > sysdate 判空,以及比较时间,关键字"is"和">"。
8. upper(psu.user_code)=upper('%s') 都以大写来比较,类似的,C++中有UpperCase函数。
9. 根据表中已有数据,创建一条“类似”数据并插入:??
10.select to_char(0.8, '0.0')||'%' from dual 查询结果是字符串:0.8%
- 基于Oracle的SQL语句备忘
- oracle sql 语句 记录备忘
- 基于oracle的sql语句调优
- oracle number 类型sql语句备忘
- oracle、SQL Server、Mysql分页语句备忘
- oracle、SQL Server、Mysql分页语句备忘
- oracle、SQL Server、Mysql分页语句备忘
- 学习SQL查询语句 基于Oracle默认的表
- 基于Oracle数据库的sql语句,有点乱
- 一些简单的mysql SQL语句备忘
- SQL语言的CASE语句备忘
- 备忘一些用到的SQL语句
- Oracle 基础语句备忘
- 一段sql语句,备忘!
- SQL常用语句备忘
- SQL语句备忘
- 备忘sql语句
- SQL语句备忘
- libSVM应用举例
- 完全解决xampp 无法启动APACHE的问题。
- 解决ubuntu linux打开windows文件的乱码问题 利用LibreOffice转码
- platform_device和platform_driver
- Spring注解
- 基于Oracle的SQL语句备忘
- VoIP网络电话回音产生的原因分析
- Oracle11g Real Application Clusters --官方文档
- JAVA代理模式
- android应用的欢迎启动界面效果
- android 权限大全
- PL/SQL单行字符串函数
- eclipse/myeclipse高亮显示 处理。
- wordpress中的Feeds