You can't specify target table for update in FROM clause
mysql> Update EACONTACTGROUPS A
SET GROUPNAME=(Select CONCAT(B.GROUPNAME,'-',A.GROUPNAME) FROM EACONTACTGROUPS B Where B.CORPID=A.CORPID AND B.USERID=A.USERID AND B.GROUPID=A.PARENTGROUPID)
Where A.PARENTGROUPID IS NOT NULL;
ERROR 1093 (HY000): You can't specify target table 'A' for update in FROM clause
上面是目前MYSQL5.0仍然有的限制,文档中说:
In general, you cannot modify a table and select from the same table in a subquery. For example, this limitation applies to statements of the following forms:
mysql> Update EACONTACTGROUPS A
SET GROUPNAME=(Select CONCAT(B.GROUPNAME,'-',A.GROUPNAME) FROM EACONTACTGROUPS B Where B.CORPID=A.CORPID AND B.USERID=A.USERID AND B.GROUPID=A.PARENTGROUPID)
Where A.PARENTGROUPID IS NOT NULL;
ERROR 1093 (HY000): You can't specify target table 'A' for update in FROM clause
上面是目前MYSQL5.0仍然有的限制,文档中说:
In general, you cannot modify a table and select from the same table in a subquery. For example, this limitation applies to statements of the following forms:
Tomcat中web.xml文件的详细说明
<?xml version="1.0" encoding="GB2312"?> <!--
Web.xml依次定议了如下元素:
<web-app>
<display-name></display-name> 定义了WEB应用的名字
<description></description> 声明WEB应用的描述信息
<filter></filter>
<filter-mapping></filter-mapping>
<servlet></servlet>
<?xml version="1.0" encoding="GB2312"?> <!--
Web.xml依次定议了如下元素:
<web-app>
<display-name></display-name> 定义了WEB应用的名字
<description></description> 声明WEB应用的描述信息
<filter></filter>
<filter-mapping></filter-mapping>
<servlet></servlet>
Tags: TOMCAT