I used to see my senior developers use WITH (NOLOCK) when querying in SQL Server and wonder why they use. Now i explored it and found that it's useful to improve the performance in executing the query . However there is a disadvantage in using it. Th…
I used to see my senior developers use WITH (NOLOCK) when querying in SQL Server and wonder why they use. Now i explored it and found that it's useful to improve the performance in executing the query . However there is a disadvantage in using it. Th…
查询时加序号 a:没有主键的情形: ,) as iid,* into #tmp from TableName Select * from #tmp Drop table #tmp b:有主键的情形: ) from TableName where KeyField <= a.KeyField) as iid,* from TableName a eg: ) from user_Admin where id<=a.id) as ID,id,displayName from user_Admin a…
Ms Sql server 2005在开启Microsoft SQL Management时,如果出现"未能加载包“Microsoft SQL Management Studio Package”"这个错,则Microsoft SQL Management就会自动关闭,重新启动电脑也不能解决问题. 在网上搜索了下,在http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=349268&SiteID=1 处有解决办法,就是修复安…
今天去逛论坛 时发现了一个很有趣的问题: 谁能给我我解释一下这段程序的结果为什么是:2.而不是:3 代码如下: class Test { public int aaa() { int x = 1; try { return ++x; } catch (Exception e) { } finally { ++x; } return x; } public static void main(String[] args) { Test t = new Test(); int y = t.aaa();…
向mysql数据库中导入sql文件时,如果文件过大(几百M),会提示"Error Code: 1153 - Got a packet bigger than 'max_allowed_packet' bytes" 1.查看目前数据库配置 show VARIABLES like '%max_allowed_packet%'; 显示如下结果 +--------------------+---------+ | Variable_name | Value | +--------…
0X1查看页面 0x2源码 <?php include("../sql-connections/sql-connect.php"); $id=$_GET['sort']; if(isset($id)) { //logging the connection parameters to a file for analysis. $fp=fopen('result.txt','a'); fwrite($fp,'SORT:'.$id."\n"); fclose($fp…
在Hive中执行DDL之类的SQL语句时遇到的一个问题 作者:天齐 遇到的问题如下: hive> create table ehr_base(id string); FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections, we don't support retries…