In the manual we see:

   * Columns selected for output can be referred to in `ORDER BY' and
     `GROUP BY' clauses using column names, column aliases, or column
     positions.  Column positions are integers and begin with 1:

          mysql> SELECT college, region, seed FROM tournament
              ->     ORDER BY region, seed;
          mysql> SELECT college, region AS r, seed AS s FROM tournament
              ->     ORDER BY r, s;
          mysql> SELECT college, region, seed FROM tournament
              ->     ORDER BY 2, 3;

     To sort in reverse order, add the `DESC' (descending) keyword to
     the name of the column in the `ORDER BY' clause that you are
     sorting by.  The default is ascending order; this can be specified
     explicitly using the `ASC' keyword.

     Use of column positions is deprecated because the syntax has been
     removed from the SQL standard.

Only in the last sentence are we alerted that what we have just
studied is deprecated! Warn before, not after, mentioning deprecated
material.

P.S., mention how to "SELECT *" except one or two fields. E.g., one
wants to SELECT 24 of the 25 fields. Does he have to list all 24 in
the command or is there some shortcut to say "SELECT * EXCPET nurd"?
Or is he best just piping to Unix cut(1).

P.S., in 12.3 String Functions
mention how one can do the equivalent of Unix "cat -v", to convert non
printable characters into something printable. (I don't want to send a
0x83 to iconv -f big5 -t utf8, but at the same time don't want to use
ASCII() on perfectly printable ASCII. Maybe I could use
EXPORT_SET() but it is documented over my head.
OK, did SELECT IF(ASCII(x)>127,ASCII(x),x) for now.

P.S., make valid HTML:
$ mysql -H ...|validate
*** Errors: ***
Error at line 1, character 1:  missing document type declaration; assuming
        HTML 4.01 Transitional
Error at line 1, character 16:  document type does not allow element
        "TABLE" here
And why don't you (optionally, default=yes) throw a newline in after
each line, in case one ever needs to view the source.
$ mysql -H ...|wc
      0     476   31519
By gosh, that is the longest line I have ever encountered in my life
with computers.

While you are at it, here we have to look into the 180+ column to get
at the meat of this error message:
     ERROR 1064 (42000) at line 1: 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 'SEPARATOR ' '' at line 1
Perhaps add newlines, or put the meat before column 80, or both.

P.S., admit the bug mailing address mysql@lists.mysql.com at the end
of the bug submission discussion, so e.g., even if mysqlbug is broken,
one can still get thru.

P.S., GNU General Public License: their address is no longer on Temple Place.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to