这是什么语句啊? 类似这样的语句有哪些呀?

解决方案 »

  1.   

    FOUND_ROWS() A SELECT statement may include a LIMIT clause to restrict the number of rows the server returns to the client. In some cases, it is desirable to know how many rows the statement would have returned without the LIMIT, but without running the statement again. To obtain this row count, include a SQL_CALC_FOUND_ROWS option in the SELECT statement, and then invoke FOUND_ROWS() afterward: mysql> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name
        -> WHERE id > 100 LIMIT 10;
    mysql> SELECT FOUND_ROWS();The second SELECT returns a number indicating how many rows the first SELECT would have returned had it been written without the LIMIT clause. 
      

  2.   

    FOUND_ROWS() 
    A SELECT语句可能包括一个 LIMIT 子句,用来限制服务器返回客户端的行数。在有些情况下,需要不用再次运行该语句而得知在没有LIMIT 时到底该语句返回了多少行。
      

  3.   

    SELECT FOUND_ROWS() as count from dual  LIMIT 1看成如上语句应该就容易理解了。 这个LIMIT 1没有什么意义在这里,因为SELECT FOUND_ROWS() 本身只会返回一行。
      

  4.   

    这个你可以参考MYSQL的语法手册。 函数有很多。 SELECT语句的语法就一种。MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html