表的第一列..就好像 SELECT ... FORM ... ORDER BY 1 DESC;

解决方案 »

  1.   

    CREATE TABLE `table1` (
      `a` mediumint(4) NOT NULL auto_increment,
      `b` varchar(20) NOT NULL default '',
      `c` varchar(20) NOT NULL default '',
      `d` tinyint(2) NOT NULL default '1',
      `e` varchar(50) default NULL,
      PRIMARY KEY  (`a`),
      UNIQUE KEY `a` (`a`)
    ) TYPE=MyISAMselect count(1) from table1  == select count(a) from table1  !!
      

  2.   

    倏然我知道是表的第一列..但感觉用什么数字效果都是一样的!嗬嗬!mysql> desc logoff;
    +------------+-------------+------+-----+---------+-------+
    | Field      | Type        | Null | Key | Default | Extra |
    +------------+-------------+------+-----+---------+-------+
    | usernumber | varchar(15) | YES  | MUL | NULL    |       |
    +------------+-------------+------+-----+---------+-------+
    1 row in set (0.41 sec)mysql> select count(1) from logoff;
    +----------+
    | count(1) |
    +----------+
    |  1461742 |
    +----------+
    1 row in set (0.03 sec)mysql> select count(1000) from logoff;
    +-------------+
    | count(1000) |
    +-------------+
    |     1461742 |
    +-------------+
    1 row in set (0.00 sec)mysql> select count(0) from logoff;
    +----------+
    | count(0) |
    +----------+
    |  1461742 |
    +----------+
    1 row in set (0.00 sec)mysql> select count(-1) from logoff;
    +-----------+
    | count(-1) |
    +-----------+
    |   1461742 |
    +-----------+
    1 row in set (0.00 sec)
      

  3.   

    呵呵,
    是的.就好像分组后 COUNT(*) = COUNT(Col1) 一样.
    参数已没有什么实际意义了.