
数据库相关
小柏---
咸鱼一条,没事翻翻身,晒晒太阳
展开
-
Oracle 数据库表空间dbf文件被删除了
1、sql>alter system set “_ALLOW_RESETLOGS_CORRUPTION”=true scope=spfile;2、sql>shutdown immediate3、sql>startup mount4、alter database datafile ‘…/X1000_1.dbf’ offline drop;5、alter database open;原创 2021-06-16 16:27:23 · 839 阅读 · 0 评论 -
oracle 当一张表中有重复数据时 如何去重
--查询一张表中有重复的数据(该表无主键) 查询结果为去重后的数据select * from table1where rowid !=(select max(rowid)from table1b where a.NSUBACCOUNTID=b.NSUBACCOUNTID and a.dtdate = b.dtdate .......)and a.dtdate=to_date('2021-02-19','yyyy-mm-dd')--删除 一张表中有重复的数据(该表无主键)delete fr...原创 2021-02-24 18:23:10 · 1104 阅读 · 0 评论 -
PL/SQL中declare、begin关键字解释
使用declare或begin关键字开头的bai叫匿名块,每次使用均需要进行编译,不能存储在数据库中且不能被其他PL/SQL调用。而存储过程,存储函数,触发器等叫命名块,一经编译后面就可直接调用,且可以存储在数据库中,被其他PL/SQL 调用;declareage number(4);--声明一个参数bai a 类型du为 number类型 长度为4beginselect teaAge into age from teacher where teaid = 122; --查询 teaid为12原创 2021-02-04 17:31:59 · 6368 阅读 · 0 评论