1、mysql :LIKE CONCAT('%',#{empname},'%' ) 或者 LIKE CONCAT('%',‘${empname}’,'%' )2、oracle:LIKE '%'||#{empname}||'%'select * from person where name like ...
分类:
其他好文 时间:
2015-08-31 16:59:05
阅读次数:
136
出现这种情况是因为mysql服务器出于安全考虑,默认只允许本地登录数据库服务器。解决办法:将远程服务器上的mysql数据库中的user表中root用户所对应的Host字段"127.0.0.1"改为"%"即可。mysql>usemysqlmysql>updateusersetHost="%"where...
分类:
数据库 时间:
2015-08-31 16:53:13
阅读次数:
173
更换域名UPDATE wp_options SET option_value = replace( option_value, 'http://old.com', 'http://new.coom' ) WHERE option_name = 'home' OR option_name = 'sit...
分类:
其他好文 时间:
2015-08-31 16:40:30
阅读次数:
140
一 数据查询 1 其基本语法格式为? Select?字段列表?--?用于指定输出字段?
[?INTO?新表?]?--将检索结果存储到?一个新的数据库表中?
[FROM?数据源]--?用于指定检索的数据来源?
[?WHERE?搜索条件?]...
分类:
其他好文 时间:
2015-08-31 15:31:41
阅读次数:
179
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,Sql 代码 : select id from t where num is nul...
分类:
数据库 时间:
2015-08-31 15:03:31
阅读次数:
256
Mysql -----------------------------------------------------------------------------Mysql 改默认密码update mysql.user set Password=PASSWORD('123456') WHERE ...
分类:
Web程序 时间:
2015-08-31 15:02:24
阅读次数:
157
概要:对之前的代码进行改动,还有实现了条件查询,和一些基本的方法;先列出一些BaseMethod:1.参数化where条件判断是否存在记录 /// /// 参数化where条件判断 /// /// where关键字后的判断语句(参数化) /// (参数化)参数集合 /// public vir...
分类:
数据库 时间:
2015-08-31 14:58:00
阅读次数:
243
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list. Follow up:Can you ...
分类:
其他好文 时间:
2015-08-31 13:26:30
阅读次数:
215
一 where过滤 1 使用AND 和 OR 组合查询条件? SELECT * from sell WHERE Sell_Price>=1000 and(or) Sell_Price<=2000? 2 使?用Between 和 Not Between 过滤记录? SELECT * from sell WHERE Sell_Price BETWEE...
分类:
其他好文 时间:
2015-08-31 12:01:58
阅读次数:
170
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 or...
分类:
其他好文 时间:
2015-08-31 11:45:23
阅读次数:
129