This is a discussion on What kind of thing can occur after LIMIT? within the MySQL Database forums, part of the Database Forums category; >From the manual, Select statement... SELECT [ALL | DISTINCT | DISTINCTROW ] [HIGH_PRIORITY] [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT] [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS] select_expr, ... [FROM ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
>From the manual,
Select statement... SELECT [ALL | DISTINCT | DISTINCTROW ] [HIGH_PRIORITY] [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT] [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS] select_expr, ... [FROM table_references [WHERE where_condition] [GROUP BY {col_name | expr | position} [ASC | DESC], ... [WITH ROLLUP]] [HAVING where_condition] [ORDER BY {col_name | expr | position} [ASC | DESC], ...] [LIMIT {[offset,] row_count | row_count OFFSET offset}] [PROCEDURE procedure_name(argument_list)] [INTO OUTFILE 'file_name' export_options | INTO DUMPFILE 'file_name' | INTO @var_name [, @var_name]] [FOR UPDATE | LOCK IN SHARE MODE]] any real example when Limit is not at the end of the statetment? tanks |
|
|||
|
howa <howachen@gmail.com> wrote:
>> From the manual, > > Select statement... > > SELECT > [ALL | DISTINCT | DISTINCTROW ] > [HIGH_PRIORITY] > [STRAIGHT_JOIN] > [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT] > [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS] > select_expr, ... > [FROM table_references > [WHERE where_condition] > [GROUP BY {col_name | expr | position} > [ASC | DESC], ... [WITH ROLLUP]] > [HAVING where_condition] > [ORDER BY {col_name | expr | position} > [ASC | DESC], ...] > [LIMIT {[offset,] row_count | row_count OFFSET offset}] > [PROCEDURE procedure_name(argument_list)] > [INTO OUTFILE 'file_name' export_options > | INTO DUMPFILE 'file_name' > | INTO @var_name [, @var_name]] > [FOR UPDATE | LOCK IN SHARE MODE]] > > > > any real example when Limit is not at the end of the statetment? Take your pick, for instance: SELECT * FROM table LIMIT 10 INTO OUTFILE ('/path/to/file'); -- Rik Wasmus Posted on Usenet, not any forum you might see this in. Ask Smart Questions: http://tinyurl.com/anel |
|
|||
|
But seems INTO OUTFILE ('/path/to/file'); can be put before the FROM
cause? so any statement must put at the end? On Mar 7, 4:17 am, Rik <luiheidsgoe...@hotmail.com> wrote: > howa <howac...@gmail.com> wrote: > >> From the manual, > > > Select statement... > > > SELECT > > [ALL | DISTINCT | DISTINCTROW ] > > [HIGH_PRIORITY] > > [STRAIGHT_JOIN] > > [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT] > > [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS] > > select_expr, ... > > [FROM table_references > > [WHERE where_condition] > > [GROUP BY {col_name | expr | position} > > [ASC | DESC], ... [WITH ROLLUP]] > > [HAVING where_condition] > > [ORDER BY {col_name | expr | position} > > [ASC | DESC], ...] > > [LIMIT {[offset,] row_count | row_count OFFSET offset}] > > [PROCEDURE procedure_name(argument_list)] > > [INTO OUTFILE 'file_name' export_options > > | INTO DUMPFILE 'file_name' > > | INTO @var_name [, @var_name]] > > [FOR UPDATE | LOCK IN SHARE MODE]] > > > any real example when Limit is not at the end of the statetment? > > Take your pick, for instance: > > SELECT * FROM table LIMIT 10 INTO OUTFILE ('/path/to/file'); > -- > Rik Wasmus > Posted on Usenet, not any forum you might see this in. > Ask Smart Questions:http://tinyurl.com/anel |