84669 Lernen von Personen
152542 Lernen von Personen
20005 Lernen von Personen
5487 Lernen von Personen
7821 Lernen von Personen
359900 Lernen von Personen
3350 Lernen von Personen
180660 Lernen von Personen
48569 Lernen von Personen
18603 Lernen von Personen
40936 Lernen von Personen
1549 Lernen von Personen
1183 Lernen von Personen
32909 Lernen von Personen
比如,我们想查询结果集的最面的两条信息,比如persion表的头两条记录:
SELECT TOP 2 * FROM Persons
也可以使用limit:
limit
select * from Persons limit 0,2
请问这两个有什么区别,谁更好一点呢????????
我擦!! MYSQL没有SELECT TOP的语法!!! 白问了,奶奶的
业精于勤,荒于嬉;行成于思,毁于随。
这是来源于不同数据库里面的使用方式: 1,在access / ms sql server里面支持的sql用法select top; 2,在mysql / oracle里面支持的sql用法为select ... limit; 就使用而言两者没有什么区别.只是应用平台不一样而已.
mysql> SELECT TOP 2 * FROM ac_article_img; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2 * FROM ac_article_img' at line 1
你用的是哪个版本的Mysql,貌似5.0之后就不支持这个查询了。
这是来源于不同数据库里面的使用方式:
1,在access / ms sql server里面支持的sql用法select top;
2,在mysql / oracle里面支持的sql用法为select ... limit;
就使用而言两者没有什么区别.只是应用平台不一样而已.
你用的是哪个版本的Mysql,貌似5.0之后就不支持这个查询了。