随笔分类 -  DataBase

结构化查询语言
摘要:1=1 1<>1及<>的使用方法 阅读全文
posted @ 2023-10-19 14:49 Phoenixy 阅读(1088) 评论(0) 推荐(0)
摘要:修改数据库表名 阅读全文
posted @ 2023-08-03 10:30 Phoenixy 阅读(167) 评论(0) 推荐(0)
摘要:使用to_char处理日期 格式代码 语法 TO_CHAR(date,’格式’); -- SQL中不区分大小写 用法 to_char(sysdate,'q') 季 to_char(sysdate,'yyyy')年 to_char(sysdate,'mm')月 to_char(sysdate,'dd' 阅读全文
posted @ 2023-07-26 15:27 Phoenixy 阅读(230) 评论(0) 推荐(0)
摘要:表增加注释 comment on table 表名 is '表注释"; 列增加注释 comment on column 表.列 is '列注释'; 读取表注释 select * from user_tab_comments where comments is not NULL AND TABLE_N 阅读全文
posted @ 2023-07-19 10:29 Phoenixy 阅读(218) 评论(0) 推荐(0)
摘要:substr() 函数 用于截取对应字段指定长度。 SUBSTR(string ,pos,len) string:指定字符串 pos:规定字符串从何处开始,(这里的第一个位置是1而不是0)为正数时则从字段开始出开始,为负数则从结尾出开始。 len:要截取字符串的长度。(是从1开始计数而不是0) IN 阅读全文
posted @ 2023-06-25 15:13 Phoenixy 阅读(207) 评论(0) 推荐(0)
摘要:方法一: -- 语法 case when 列名=条件 then 命名 else 命名 end 示例 select id, (case when class= 0 then "语文" when class= 1 then "数学" when class = 2 then "英语" end) as 学科 阅读全文
posted @ 2023-06-06 09:35 Phoenixy 阅读(694) 评论(0) 推荐(0)
摘要:更新 remarks 数据时,在原数据 01 基础上追加数据 ,11 update tablename set remarks=remarks||',11' where id='001'; 执行结果 remarks = 01,11 阅读全文
posted @ 2023-03-04 13:58 Phoenixy 阅读(243) 评论(0) 推荐(0)
摘要:建表是给时间字段增加默认值 阅读全文
posted @ 2023-02-16 15:36 Phoenixy 阅读(163) 评论(0) 推荐(0)
摘要:增加/修改/删除表结构中的列 阅读全文
posted @ 2023-02-07 10:00 Phoenixy 阅读(643) 评论(0) 推荐(0)
摘要:快速替换sql关键字 阅读全文
posted @ 2022-09-14 09:39 Phoenixy 阅读(278) 评论(0) 推荐(0)
摘要:自定义快捷关键字自动转换为大写 阅读全文
posted @ 2022-08-31 16:19 Phoenixy 阅读(2768) 评论(0) 推荐(0)
摘要:查找 clob大字段中是否包含某个字符串内容 阅读全文
posted @ 2022-08-16 14:18 Phoenixy 阅读(1542) 评论(0) 推荐(0)
摘要:序列的创建修改删除及应用 阅读全文
posted @ 2022-08-11 09:12 Phoenixy 阅读(1206) 评论(0) 推荐(0)
摘要:oracle 19c 安装流程 阅读全文
posted @ 2022-07-25 11:25 Phoenixy 阅读(2142) 评论(0) 推荐(0)
摘要:PL/SQL 语言 面向过程语言,是对sql语言的扩展,主要用来编写存储过程和存储函数等。 格式 声明方法 -- Created on 2022/6/14 declare -- Local variables here -- 变量 begin -- Test statements here -- 一 阅读全文
posted @ 2022-06-22 14:30 Phoenixy 阅读(755) 评论(0) 推荐(1)
摘要:Navicat 完全卸载 阅读全文
posted @ 2021-09-23 09:59 Phoenixy 阅读(3854) 评论(0) 推荐(0)
摘要:sqlite 阅读全文
posted @ 2021-08-30 15:55 Phoenixy 阅读(505) 评论(0) 推荐(0)
摘要:记录PLSQL 使用时出现的问题及解决方法 阅读全文
posted @ 2021-08-30 15:04 Phoenixy 阅读(1122) 评论(0) 推荐(0)
摘要:plsql安装及使用 阅读全文
posted @ 2021-08-30 11:32 Phoenixy 阅读(506) 评论(0) 推荐(0)
摘要:SQL的查询语句 阅读全文
posted @ 2021-08-27 10:21 Phoenixy 阅读(95) 评论(0) 推荐(0)