oracle
一杯咖啡CAFEBABE
这个作者很懒,什么都没留下…
展开
-
修改sql develop 的字符编码
主要原因是应为oracle客户端和服务器使用的字符编码不同1,查询服务器使用的字符编码select userenv('language') from dual;2,新建环境变量NLS_LANGAMERICAN_AMERICA.ZHS16GBK(服务器字符编码)...原创 2014-07-25 09:37:54 · 268 阅读 · 0 评论 -
oracle 汉字排序
1、使用拼音排序 NLS_SORT=SCHINESE_PINYIN_M 2、使用笔画排序 NLS_SORT=SCHINESE_STROKE_M 第一顺序笔画,第二顺序部首; 3、使用偏旁部首排序 NLS_SORT=SCHINESE_RADICAL_M 第一顺序部首,第二顺序笔画; 这样,就可以在查询的时候,指定汉字的排序方...原创 2015-01-16 17:24:42 · 246 阅读 · 0 评论 -
oracle 删除列
- Drop columns alter table 表名 drop column 列名;-- Drop columns alter table t_user drop column id;原创 2015-01-16 17:26:04 · 257 阅读 · 0 评论 -
配置TOMCAT JNDI
在 tomcat 的context.xml中 配置如下代码<Resource name="JNDIa的名字" auth="Container" type="javax.sql.DataSource" url="jdbc:oracle:thin:@localhost:1521:orcl" driverClassName="o...原创 2015-01-16 17:26:18 · 141 阅读 · 0 评论 -
Case When 的用法
格式:case when 条件 then 内容 when 条件 then 内容 else 内容 end如: select t.name, case when t.fengshu >= 80 then 'pass' else 'file' end ...原创 2014-07-28 11:06:16 · 100 阅读 · 0 评论 -
oracle 添加外键约束
-- Add/modify columns 添加一列alter table T_TABLE_SHU add parent_id number;-- Create/Recreate primary, unique and foreign key constraints --格式 : alter table 表名 add constraint 约束名 forreign key (列名)alter...原创 2014-07-28 11:06:56 · 771 阅读 · 0 评论 -
start with ...connect by ... prior ...的使用方法
--从根查到叶select * from t_table_shu t start with t.id = 1 connect by prior t.id = t.parent_id;--从叶查到跟select * from t_table_shu t start with t.id = 5 connect by prior t.id = t.parent_id;prior 指的是一哪一方为...原创 2014-09-04 14:38:47 · 217 阅读 · 0 评论