码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in the array. ...
分类:其他好文   时间:2015-03-17 21:55:20    阅读次数:110
Sql Server 强制断开数据库已有连接的方法
用管理员账户sa登陆,然后在master下新建查询: 在查询窗口输入: declare @i int declare cur cursor for select spid from sysprocesses where db_name(dbid)= '要断开连接的数据库名称' open cur fetch next from cur into @i while @@fetch_stat...
分类:数据库   时间:2015-03-17 21:52:08    阅读次数:162
sql简单的语句
选择:select * from table1 where 范围 插入:insert into table1(field1,field2) values(value1,value2) 删除:delete from table1 where 范围 更新:update table1 set field1=value1 where 范围 查找:select * from table1 whe...
分类:数据库   时间:2015-03-17 17:59:05    阅读次数:180
T-SQL 的简单查询语句
通配符:“_”: 代表匹配一个字符“%”: 代表匹配多个字符;[]:表示范围,可以包含多个数据[^] 表示取反 “-“ 表示范围逻辑与 and 逻辑或 or 逻辑非 not 聚会函数 :聚合函数:sum()/max()/min()/avg()/count()where /group by /havi...
分类:数据库   时间:2015-03-17 17:44:26    阅读次数:195
数据库表的迁移复制的SQL操作
在项目中,有时我们想备份表的数据,那么把原先的表复制到另一个表中,当然,要求字段要一致。 下面是测试的sql语句 Insert into Tb_Dispatch_Mail_History(mail_no ,post_batchno ) select mail_no ,post_batchno from Tb_Dispatch_Mail_Post tp where tp.pos...
分类:数据库   时间:2015-03-17 15:53:25    阅读次数:140
mysql自定义函数与过程中写法的注意事项
1 BEGIN 2 #Routine body goes here... 3 /* 4 update szzx_goods_common set gc_id=i where gc_name=(SELECT gc_name from szzx_goods_class where gc_...
分类:数据库   时间:2015-03-17 15:40:15    阅读次数:228
Container with most water
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:其他好文   时间:2015-03-17 14:00:52    阅读次数:108
oracle exists / in
exists 先从外层查询中取第一个元组,然后和内层查询中相关的属性值,处理内层查询,若内层where子句为真,则外层的这个元组放入到结果集中。 in 先执行内层查询,将结果存放在临时表中,然后执行外层查询。 in 不对null进行处理,见下图,没有返回结果。 总结: 内层查询得出的结果集记录较少,...
分类:数据库   时间:2015-03-17 13:49:18    阅读次数:168
[LeetCode] Word Search
Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace...
分类:其他好文   时间:2015-03-17 12:18:53    阅读次数:111
OCCI处理CHAR类型字符串变量的不同
问题背景: 一个旧应用,原先应用是用proc写的,9i的库,现在应用需要改为使用OCCI,其中有一段查询逻辑:select ... where upper(state)=upper(:1)。 (此处请不要纠结于where条件中state字段使用了upper函数,因为此表数据量很小,且其历史比较悠久,未建索引。) 对应表中定义的state字段类型是char(3),但此处查询条件变量的值可能是两...
分类:其他好文   时间:2015-03-17 09:02:55    阅读次数:154
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!