嵌套查询语法是一样的,只是mysql从4.1开始才支持子查询
解决方案 »
- #2013 - reading initial communication packet,system error: 111
- mysql报表
- 触发器执行顺序问题
- 求通过链接服务器调用MYSQL上过程
- MySQL GUI Tools远程连接MySQL数据库
- MySQL安装后不能使用问题?
- 一条SQL语句查询出2个结果
- 安装mysql不成功
- 求推荐一款优秀的开源的数据库管理工具,可以支持mysql、oracle、sqlserver、db2等。
- MAC电脑登陆mysql出现错误
- 大家的数据库字符集一般用什么?GB*还是UTF8?
- [200分]在程序操作mysql数据库时,到底mysql的password函数该怎样用!
他显示No SQL statement specified <sql:query var="query" dataSource="${jspdev}">
SELECT * FROM category where catid not in(select category from product )
</sql:query><%@ page contentType="text/html; charset=gb2312" language="java" errorPage="../../error.jsp" %>
<%@ include file="../../jstl.inc"%>
delecategory_do.jsp
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../../hellking.css" type=text/css rel=stylesheet>
</head>
<body><sql:update var="update" dataSource="${jspdev}" sql="delete from category where catid='${param.catid}'">
</sql:update>
<c:redirect url="deleteCategory.jsp"/>
</body>
</html>
<%@ include file="../../jstl.inc"%><html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../../hellking.css" type=text/css rel=stylesheet>
</head>
<body>
<!--只有空的分类才能被删除-->
<hr color=008800 align=center width=80%><div align="center">::以下是系统中可以删除分类,如果分类中已经有商品,那么就不能被删除::</div>
<sql:query var="query" dataSource="${jspdev}">
SELECT * FROM category where catid not in(select category from product )
</sql:query> <table align="center" bgcolor="#008800" border="0" cellspacing="2" cellpadding="5">
<tr bgcolor="#cccccc">
<td><b>ID</b></td>
<td><b>名称 </b></td>
<td><b>描述 </b></td>
<td><b>删除 </b></td>
</tr>
<c:forEach var="row" items="${query.rows}">
<tr bgcolor="#FFFF88">
<td> ${row.catid}</td>
<td> ${row.name}</td>
<td> ${row.descn }</td>
<td><a href="deleteCategory_do.jsp?catid=${row.catid}"/>删除</a></td>
</tr>
</c:forEach>
</table>
</form>
</body>
</html>
<%@ include file="../../jstl.inc"%><html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../../hellking.css" type=text/css rel=stylesheet>
</head>
<body><sql:update var="update" dataSource="${jspdev}" sql="delete from category where catid='${param.catid}'">
</sql:update>
<c:redirect url="deleteCategory.jsp"/>
</body>
</html>