update `wp_posts` set `post_content`=REPLACE(`post_content`,'localhost/linkcp','www.linkcp.cn') where `post_content` like '%localhost/linkcp%'; 替换wp_p...
分类:
数据库 时间:
2015-04-28 20:25:02
阅读次数:
155
不多说,看代码select b.*,a.kscj,a.paiming from (select t.kch,t.kcm,t.kscj,t.xh, rank() over (order by t.kscj desc) paiming //排名用的 from CJ_LRCJB t where t.k.....
分类:
数据库 时间:
2015-04-28 20:22:41
阅读次数:
134
笛卡尔积:一个表中所有行与另一个表中的所有行进行连接(握手模式)eg:emp表中有4行有,dept表中有16行,则结果为64行 select * from emp,dept; 当语句中含有where限制时,则不会出现笛卡尔积连接分为等连接,非等连接,外连接和自连接 1>等连接:select...
分类:
其他好文 时间:
2015-04-28 18:17:23
阅读次数:
111
今天用mysql workbench在更新数据的时候,出现了下面错误:15:52:39 update wp_posts set post_content = replace(post_content, '/water', '') Error Code: 1175. You are using saf...
分类:
数据库 时间:
2015-04-28 17:50:28
阅读次数:
197
{sdcms:rs field=”id,title,style,createdate,isurl,url,classid” table=”sd_content” where=”islock=1″ order=”rnd”}{sdcms.cutstr($rs[title],30,1)}{/sdcms:r...
分类:
其他好文 时间:
2015-04-28 17:28:49
阅读次数:
124
数据库中的集合操作主要包括3个方面:
1. Union合并行
union的作用是为了合并两个查询结果,而且在合并的同时把相同的行去重。
例如:
如果我们需要显示全部的并集,即不去重,可以使用union all,如下:
我们只需要使用union来连接两个select-from-where语句块即可。
unio...
分类:
数据库 时间:
2015-04-28 16:21:14
阅读次数:
384
Repeating DecimalsThe decimal expansion of the fraction 1/33 is , where the is used to indicate that the cycle 03 repeats indefinitely with no interve...
分类:
其他好文 时间:
2015-04-28 15:52:54
阅读次数:
114
题目Write a SQL query to get the nth highest salary from the Employee table.
Id
Salary 1
100
2
200
3
300
For example, given the above Employee table, the nth highest salary where n = 2 is...
分类:
其他好文 时间:
2015-04-28 14:17:49
阅读次数:
99
Bitwise AND of Numbers Range问题:Given a range [m, n] where 0 n || m>= 1; n >>= 1; moveFactor <<= 1; } return m * mo...
分类:
其他好文 时间:
2015-04-27 21:40:05
阅读次数:
353
LINQ可以很方便的对数据源进行筛选、排序和分组操作。 格式:from …… 例: from customer(范围变量) in customers(数据源) where …… where customer.Firstname=="sadas" (筛选的条件) select …… select cu...