首先是模糊查询的问题,开始时我使用如下条件:select * from user where name like '%#value#%'. 可是怎么也不行,好像还报错了.后来在网上找到了解决方法,就是使用$来代替#号.1>写成: like '%$value$%' 就可以了,,2>同时还找到另一个方法...
分类:
数据库 时间:
2015-10-19 15:28:37
阅读次数:
227
2015-10-19控制文件位置SQL> select value from v$parameter where name ='control_files';SQL> show parameter control_files;SQL> col name for a55;SQL> select sta...
分类:
数据库 时间:
2015-10-19 15:25:55
阅读次数:
190
相同点:1.truncate和不带where子句的delete、以及drop都会删除表内的数据。2.drop、truncate都是DDL语句(数据定义语言),执行后会自动提交。不同点:1. truncate 和 delete 只删除数据不删除表的结构(定义)drop 语句将删除表的结构被依赖的约束(...
分类:
数据库 时间:
2015-10-19 15:17:38
阅读次数:
224
当查询的两个表的大小一样的时候,用exits和in的效率是差不多的当查询的表,一个表大(A),一个表小(B),则子查询大的要用exits,子查询小的要用inselect * from A where c in(select c from B) 用到了大表的索引select * from B wher...
分类:
其他好文 时间:
2015-10-18 18:33:53
阅读次数:
188
ci是 case insensitive, 即 "大小写不敏感", a 和 A 会在字符判断中会被当做一样的;bin 是二进制, a 和 A 会别区别对待.例如你运行:SELECT * FROM table WHERE txt = ‘a‘那么在utf8_bin中你就找不到 txt = ‘A‘ 的...
分类:
其他好文 时间:
2015-10-18 17:04:22
阅读次数:
163
MyBatis模糊查询like的两种使用方法初次使用MyBatis持久层框架,进行模糊查询如like时,如果传入的map类型的参数,可以使用${}, 如果传入的不是map类型的参数, 不知道如何处理。经过研究想到了两种方法(我使用的是MySQL数据库), 如where name like conca...
分类:
其他好文 时间:
2015-10-18 16:42:07
阅读次数:
118
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled wit...
分类:
其他好文 时间:
2015-10-18 14:06:18
阅读次数:
204
mysql中有的属性:NOLL/NOT NULL,default,comment,primary key,unique key,auto_increment查询字段为空的字段:select × from stuent where sex is null;default :默认值:comment :....
分类:
其他好文 时间:
2015-10-18 11:18:17
阅读次数:
151
题目描述:(链接)There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it c...
分类:
其他好文 时间:
2015-10-17 23:34:12
阅读次数:
201
-- 查询mysql 数据库链接空闲时间持有最大空闲时间,单位为秒SHOW VARIABLES WHERE VAriable_name = 'interactive_timeout';-- 会出现wait_timeout与该参数意思相近,修改时,一起修改SHOW VARIABLES WHERE VA...
分类:
数据库 时间:
2015-10-16 20:38:53
阅读次数:
1667