Oracle Sql相关记录
2015-09-15 11:07
656 查看
1. 批量增加数据
insert into fasp_t_carolemenu(guid, roleguid, menuguid)
select sys_guid(), guid, '43B3BF934C324381892FE59F3D244629' from Fasp_t_Carole
where length(province) = 6 and province not in (select code || '00' from V_PPP_DIST_EXT)
2. 字符/字段拼接
select id || '00' from table
3. 截取字符串
select substr('str12345678', 0, 3) from dual
一个参数为要截取的字符串;第二个参数为从哪开始截取,如果为负数,那么从最后倒数几个字符开始截取;第三个参数为,截取几位。
4. 金额格式化
select to_char(nvl(money, 0), '9,999,999,999') from table
insert into fasp_t_carolemenu(guid, roleguid, menuguid)
select sys_guid(), guid, '43B3BF934C324381892FE59F3D244629' from Fasp_t_Carole
where length(province) = 6 and province not in (select code || '00' from V_PPP_DIST_EXT)
2. 字符/字段拼接
select id || '00' from table
3. 截取字符串
select substr('str12345678', 0, 3) from dual
一个参数为要截取的字符串;第二个参数为从哪开始截取,如果为负数,那么从最后倒数几个字符开始截取;第三个参数为,截取几位。
4. 金额格式化
select to_char(nvl(money, 0), '9,999,999,999') from table
相关文章推荐
- Oracle中三种循环(For、While、Loop)
- oracle存储过程常用技巧
- Oracle数据库解锁
- oracle触发器(转载)
- Oracle11g R2 ORA-00845的错误:MEMORY_TARGET not supported on this system
- oracle 与OS的存储结构
- instantclient配置oracle客户端
- Oracle 11gR2 crs_stat 命令不再显示instance信息
- ORACLE-TRIGGER-ERROR 04098 触发器无效且未通过重新验证
- 開機自動啟動ORACLE
- Oracle使用——PLSQL的中文乱码显示全是问号
- Oracle to_char,to_date
- 不安装oracle直接使用PLSQL(转载)
- 未能加载文件或程序集“Oracle.DataAccess”或它的某一个依赖项。试图加载格式不正确的程序。
- oracle 用Navicat创建的表的查询问题
- Oracle学习
- Oracle用户密码修改及解锁
- Oracle 12c下的一些基本操作(更新)
- Oracle 11g RAC开启归档,闪回并设置各自不同的路径
- 【Oracle】day01_数据类型_DDL语句_DML语句