易截截图软件、单文件、免安装、纯绿色、仅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 ......

MS SQL作业问题 - MS-SQL Server / 应用实例

如何在SQL2005中设定定时作业,比如说定时清理某些表的数据,
或者是定时的将某些表的数据导出excel!
在线等待,急急急,最好是详细步骤!
之前我做的作业有点问题!
帮UP

参考:http://hi.baidu.com/toiota ......

PHP+MYSQL数据集处理 - PHP / 基础编程

1、是不是PHP中只能使用mysql_query("update user_aa set money=money2-".$bpanmm." where uid=".$userppp);更新数据???
2、PHP更新mysql_fetch_row($res)与mysql_fetch_array($res)中的数� ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号