文章分类 -  sql

摘要:IF EXISTS ( select _tmp.pindex as c from t_policy_bk_qw _tmp with(nolock,index=u_index_pindex) where _tmp.pindex = #{pindex,jdbcType=VARCHAR} ) BEGIN update t... 阅读全文
posted @ 2018-10-22 14:55 稚语希听 阅读(267) 评论(0) 推荐(0) 编辑
摘要:stuff(str,1,1,'') 将str第一个位置开始的1个字符用空串替换 char(38) = & select char(38)+t.dep+'-'+t.arr from 表 for xml path('') 拼接成xml &amps;XXX-YYY&amps;XXX-YYY,注意这里&特殊 阅读全文
posted @ 2018-09-29 14:45 稚语希听 阅读(1307) 评论(0) 推荐(0) 编辑
摘要:-- insert into 表(字段) select 值 where not exists(select id from 表 where 验证重复的约束字段) insert into [t_direct_airline_limit] ( plat ,shop ,dep ,arr ,valid ) select 9,1,'CTU','PEK','... 阅读全文
posted @ 2018-09-28 10:12 稚语希听 阅读(173) 评论(0) 推荐(0) 编辑
摘要:-- update 表别名 set xx=val from 别名表 联结 别的表 关联 字段条件 where 约束条件 update o set platno = null,paytime = null,updatetime=null from [t_direct_order] o left join [t_direct_order_airline] f with(index = i_oid,... 阅读全文
posted @ 2018-09-28 10:10 稚语希听 阅读(74) 评论(0) 推荐(0) 编辑
摘要:<!-- 因为查询6.1的sql经常导致线程卡死,切换连接池使用,原org.springframework.jdbc.datasource.DriverManagerDataSource它不是连接池,是无限制生成新的连接 --> <!-- 开始 sixone --> <bean id="dataSo 阅读全文
posted @ 2018-07-16 16:46 稚语希听 阅读(132) 评论(0) 推荐(0) 编辑
摘要:1、使用org.springframework.jdbc.datasource.DriverManagerDataSource 说明:DriverManagerDataSource建立连接是只要有连接就新建一个connection,根本没有连接池的作用。 ${jdbc.driverClassName} ${jdbc.url} ... 阅读全文
posted @ 2018-07-16 16:15 稚语希听 阅读(569) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2018-06-13 15:36 稚语希听 阅读(3) 评论(0) 推荐(0) 编辑
摘要:select o.OBJECT_NAME, l.SESSION_ID, l.ORACLE_USERNAME, l.OS_USER_NAME, l.PROCESS from V$LOCKED_OBJECT l, USER_OBJECTS o where o.OBJECT_ID = l.OBJECT_ID; 阅读全文
posted @ 2018-05-20 12:39 稚语希听 阅读(65) 评论(0) 推荐(0) 编辑
摘要:Create function [dbo].[split] ( @SourceSql varchar(max), @StrSeprate varchar(10) ) returns @temp table(line varchar(max)) as begin declare @i int set @SourceSql = rtrim(ltrim(@SourceSql)) ... 阅读全文
posted @ 2018-05-20 12:15 稚语希听 阅读(95) 评论(0) 推荐(0) 编辑
摘要:-- mysql 格式化时间 DATE_FORMAT(t.oldstarttime ,'%Y-%c-%d %h:%i:%s') DATE_FORMAT(t.oldstarttime ,'%h:%i:%s') DATE_FORMAT(t.oldstarttime ,'%Y-%c-%d') DATE_FORMAT(t.oldstarttime ,'%h:%i') -- NOW()函数以`'Y... 阅读全文
posted @ 2018-05-02 09:30 稚语希听 阅读(355) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示