第一范文网 - 专业文章范例文档资料分享平台

2014年信息技术考核数据库试题

来源:用户分享 时间:2025/7/23 21:29:32 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

select * from emp as of timestamp sysdate - interval '20' minute;

再如:恢复5 分钟之前的7369 号员工姓名

update emp e set ename = (select ename from emp as of timestamp systimestamp - interval '5' minute where empno=e.empno ) where empno=7369;

甚至可以查询及恢复被删除的表 select * from user_recyclebin;

flashback table 表 to before drop; 05. 正则表达式

ORACLE 在建表或查询时提供正则表达式支持: 例如:查询名字以S 作为开头字母的员工

select * from emp where regexp_like(ename ,'^S'); 例如:替换电话号码显示方式

select regexp_replace('123.321.1234', '([0-9]{3})\\.([0-9]{3})\\.([0-9]{4})', '(\\1) \\2-\\3') from dual;

例如:取得email 地址中的用户名

select regexp_substr('yihang@163.com', '^[^@]+') from dual; 例如:取得email 地址中的域名

select regexp_substr('yihang@163.com', '[^@]+$') from dual; 06. 如何加注释

建表时给表和列加注释是一个比较好的数据库编程习惯 例如:表加注释

comment on table 表 is '表注释'; 例如:列加注释

comment on column 表.列 is '列注释'; 例如:查表注释

select * from user_tab_comments where table_name = 表名; 例如:查列注释

select * from user_col_comments where table_name = 表名;

搜索更多关于: 2014年信息技术考核数据库试题 的文档
2014年信息技术考核数据库试题.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c2xvug4s3b87b3ee98nbw_4.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top