MySQL中SELECT语句的基本语法是:
SELECT [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [HIGH_PRIORITY] [DISTINCT|DISTINCTROW|ALL] select_list [INTO {OUTFILE|DUMPFILE} 'file_name' export_options] [FROM table_references [WHERE where_definition] [GROUP BY col_name,...] [HAVING where_definition] [ORDER BY {unsighed_integer|col_name|formura} [ASC|DESC],...] [LIMIT [offset,] rows] [PROCEDURE procedure_name]]
从这个基本语法可以看出,最简单的SELECT语句是SELECT select_list,实际上利用这个最简单的SELECT语句,你也可以完成许多你期待的功能,首先你能利用它进行MySQL所支持的任何运算,例如:SELECT 1+1,它将返...[ 查看全文 ]