易截截图软件、单文件、免安装、纯绿色、仅160KB

mysql中执行sql语句时出错 - MS-SQL Server / 基础类


在 MySQL中执行如下语句

delete t from (select top 2 * from use_table) t

时出错:


SQL 执行错误#1064.从数据库的响应:

You hava an error in your SQL syntax ; check the manual that corresponds to your MySQL server for the right

syntax to use near '2 * from use_table) t' at line 1
SQL code:
mysql 里面可以这样写么??不懂,帮顶...
delete t from (select top 2 * from use_table) t



delete t from t where 关键字 in (select top 2 关键字 from use_table)

引用
在 MySQL中执行如下语句

delete t from (select top 2 * from use_table) t

时出错:


SQL 执行错误#1064.从数据库的响应:

You hava an error in your SQL syntax ; check the manual that corresponds to your MySQL server f……

我的mysql-5.0.22-win32里试了,没有这个语法

SQL code:
delete from 表名 where 条件 in (select top 2 条件 from 表名 )


code=SQL]delete from use_table limit 2;[[/code]
{{


相关问答:

sql小小的疑问 - .NET技术 / C#

可能因为工作的原因 接触数据库这块比较少,之前都是做程序这块,数据库这块都有专门的人来做 分工都很明细 所以对数据库这一块完全不了解。前段时间 去面试了几家公司 几乎都是在数据库这块挂掉的 连个简单的SQ ......

sql - MS-SQL Server / 疑难问题

sql的软件在哪里可以下啊!在网上找了蛮多都用不了啊

随便搞一D版吧,

迅雷第一个就可以用
2000,2005都这样

http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......

求一个SQL语句 - MS-SQL Server / 基础类

字段1,字段2.....字段N,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
想要的结果是:
1,Na ......

关于Vb中sql语句的写法(100分) - Java / Web 开发

求个vb中的sql语句的写法,次sql语句的用法是分页程序
我写的如下:其中A是用来接收每页显示的记录的条数,B是用来接收显示的当前的页面.
sqltext="select top A * from log where id not in(select top ( ......

sql 问题 - MS-SQL Server / 基础类

需求如下:
学院 academy(aid,aname)
班级 class(cid,cname,aid)
学生 stu(sid,sname,aid,cid)
住宿区 region(rid,rname)
宿舍楼 build(bid,rid,bnote) bnote是‘男’/‘女’
宿舍 dorm(did,rid,bid,bedn ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号