What kind of thing can occur after LIMIT?

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 ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-06-2007
howa
 
Posts: n/a
Default What kind of thing can occur after LIMIT?

>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

Reply With Quote
  #2 (permalink)  
Old 03-06-2007
Rik
 
Posts: n/a
Default Re: What kind of thing can occur after LIMIT?

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
Reply With Quote
  #3 (permalink)  
Old 03-07-2007
howa
 
Posts: n/a
Default Re: What kind of thing can occur after LIMIT?

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



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:27 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0