数据库
文章平均质量分 53
ssxueyi
15年软件开发、管理、产品设计经验,大数据领域新星创作者,擅长大数据和数据可视化、BI的规划、设计、落地。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
使用Flink CDC实现 Oracle数据库数据同步的oracle配置操作
使用Flink CDC实现 Oracle数据库数据同步的oracle配置操作,包括开启日志归档和用户授权具体操作。原创 2024-12-12 16:30:40 · 2606 阅读 · 0 评论 -
mysql定时任务-事件调度器(Event Scheduler)
mysql定时任务-事件调度器(Event Scheduler)及时间配置原创 2024-04-08 20:59:57 · 1499 阅读 · 0 评论 -
linux安装postgres和postgis 完整版
1.按照postgresql官网说明安装postgresqlhttps://www.postgresql.org/download/linux/redhat/postgresql10的安装说明如下:# Install the repository RPM:sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.r原创 2021-08-10 13:48:04 · 3429 阅读 · 0 评论 -
Postgresql 离线安装教程
Postgresql 离线安装教程1.下载postgresql安装包和依赖包依赖包包括:gcc、zlib、readline等,但是一般的服务器都自带gcc或zlib。postgresql包下载地址:https://ftp.postgresql.org/pub/source/readline包下载地址:http://ftp.gnu.org/gnu/readline/2.自检是否已经安装gcc、zlib、readline 可以使用以下方式:rpm -qa|grep ...原创 2020-12-12 18:25:38 · 5099 阅读 · 1 评论 -
mysql 拼接字符串函数CONCAT,列拼接函数GROUP_CONCAT
1.拼接字符串函数:CONCATselect CONCAT('hello','word');结果:helloword2.带分隔符拼接字符串函数:CONCAT_WSselect CONCAT_WS('#','hello','word');结果:hello#word3.列拼接函数:GROUP_CONCAT表数据:默认逗号分隔:select user_result,GROUP_CONCAT(user_name) from test group by user_result;..原创 2020-10-09 17:27:27 · 754 阅读 · 0 评论 -
mysql生成随机数函数
#随机数select RAND() * 100#50-100之间的随机数select 50 + RAND() * (100 - 50)#随机整数select FLOOR(RAND() * 100)#保留2位小数的随机数select truncate(RAND() * 100,2)原创 2020-08-13 18:40:10 · 1476 阅读 · 0 评论 -
mysql常用时间函数
mysql常用的日期函数及用法如下:#当前时间select now(); #结果:2020-01-18 15:25:26#当前时间戳select current_timestamp; #结果:2020-01-18 15:26:36select current_timestamp(); #结果:2020-01-18 15:26:36#前一天select date_add(no...原创 2020-01-18 15:34:57 · 430 阅读 · 0 评论 -
oracle恢复删除的表
使用drop table命令删除的表, 可以使用以下语句恢复:flashback table 表名 to before drop;原创 2019-10-17 13:38:50 · 254 阅读 · 0 评论 -
oracle使用&(百分号)或_(下划线)进行模糊查询
在oracle数据库中,&(百分号)或_(下划线)是通配符,无法直接进行模糊查询,需要进行转义,写法如下:-- 转义 _(下划线)SELECT * FROM table_name WHERE username like '%/_%' ESCAPE TO_NCHAR('/');-- 转义 %(百分号)SELECT * FROM table_name WHERE userna...原创 2019-08-07 16:44:48 · 4757 阅读 · 0 评论 -
oracle常用命令记录
笔记,笔记。-----数据库操作--监控当前数据库连接数;select count(*) from v$sessionwhere status = 'ACTIVE' and username = 'xxxx';---查看当前SQL执行时间SELECT sid "SID", ELAPSED_SECONDS "秒 已经执行", TIME_RE...原创 2018-12-20 13:56:29 · 554 阅读 · 0 评论 -
oracle case when then else 语法
case when 条件1 then action1 when 条件2 then action2 when 条件3 then action3 when 条件N then actionN else actionend原创 2019-07-23 11:27:18 · 17287 阅读 · 0 评论 -
create table as select from和 insert into select from的用法
复制表(含数据): create table table_name2 as select * from table_name1复制表(不含数据): create table table_name2 as select * from table_name1where 1=2只复制表数据:insert into table_name2 select * from table_name1...原创 2019-06-13 18:51:43 · 42875 阅读 · 3 评论 -
oracle用命令执行sql脚本文件
当sql命令过多(sql文件过大)时,用plsql执行时比较慢而且容易超时,此时可以用sqlplus命令直接执行sql脚本文件,方法如下:1、sqlplus登录>sqlplususername/password@dbname2、执行sql文件如果sql文件在当前目录下,可以直接执行:>@demo.sql如果sql文件不在当前目录下,可以使用绝对路径:>...原创 2019-05-26 11:38:57 · 66836 阅读 · 3 评论
分享