上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 27 下一页
摘要: ## [FATAL] Error while cataloging RMAN Backups ## 1、利用oracle小工具 ``` sysresv ``` > IPC Resources for ORACLE_SID "ifrsdev" : > Maximum shared memory seg 阅读全文
posted @ 2023-08-23 16:22 站着说话不腰疼 阅读(167) 评论(0) 推荐(0)
摘要: [TOC] # oracle创建新用户 ## 1、创建表空间 ```sql CREATE TABLESPACE "USER_SPACE" LOGGING DATAFILE '/u01/app/oracle/oradata/UAT/USER_SPACE.DBF' SIZE 32M REUSE AUTO 阅读全文
posted @ 2023-08-23 11:30 站着说话不腰疼 阅读(189) 评论(0) 推荐(0)
摘要: [TOC] # oracle迁移到postgres-分页问题 ## 1、oracle使用`rownum`进行分页 ```sql select * from ss_stu where rownum <= 10; ``` ## 2、postgres使用`limit`进行分页 ```sql select 阅读全文
posted @ 2023-08-23 11:27 站着说话不腰疼 阅读(61) 评论(0) 推荐(0)
摘要: [TOC] # oracle迁移到postgres-oracle中使用的`nvl`函数更改为统一的`coalesce`函数 `nvl`函数与`coalesce`函数都是值非空时,给默认值,oracle中也存在`coalesce`函数 ## 1、oracle的`nvl`函数 当成绩为空时,默认是0 ` 阅读全文
posted @ 2023-08-23 11:24 站着说话不腰疼 阅读(460) 评论(0) 推荐(0)
摘要: [TOC] # oracle迁移到postgres-oracle中使用的`decode`函数使用`case when`统一语法 oracle中也有使用`case when`语法,使用`decode`函数比较简洁。 ## 1、oracle的`decode`语法 匹配`stu_type`为`1`的值的班 阅读全文
posted @ 2023-08-23 11:23 站着说话不腰疼 阅读(259) 评论(0) 推荐(0)
摘要: [TOC] # oracle迁移到postgres-执行动态sql传参不同 在sql字符串中,会动态传入值,使用阿拉伯数据定义传参的个数。 ## 1、oracle使用的是`:1` ```sql execute immediate 'select * from sys_stu where stu_na 阅读全文
posted @ 2023-08-23 11:23 站着说话不腰疼 阅读(52) 评论(0) 推荐(0)
摘要: [TOC] # oracle迁移到postgres-事务提交方式不同 ## 1、oracle oracle默认不自动提交事务,需要手动`commit` ## 2、postgres postgres默认自动提交事务,不需要手动`commit`,导致迁移过来的pck如果有`commit`需要注释掉 阅读全文
posted @ 2023-08-23 11:23 站着说话不腰疼 阅读(32) 评论(0) 推荐(0)
摘要: [TOC] # oracle迁移到postgres-执行sql方式execute不同 ## 1、oracle使用`execute immediate` ```sql execute immediate 'sql'; ``` ## 2、postgres使用`execute` ```sql execut 阅读全文
posted @ 2023-08-23 11:22 站着说话不腰疼 阅读(78) 评论(0) 推荐(0)
摘要: # postgres执行sql片段的定义 语法格式: ```sql DO $$ DECLARE cur record; begin for cur in (select ...) loop ... end loop; end $$; ``` 阅读全文
posted @ 2023-07-28 18:43 站着说话不腰疼 阅读(39) 评论(0) 推荐(0)
摘要: # oracle的open for fetch语法 open for fetch是一种游标循环方式。 ```sql open c1 for '动态sql' [using]; loop fetch c1 into [table] exit when c1%notfound; ... end loop; 阅读全文
posted @ 2023-07-28 11:07 站着说话不腰疼 阅读(728) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 27 下一页