"Jims Oven" <ji...@itc-hongkong.com> wrote in message
news:3de6d9f3$1...@newsgroups.borland.com...
>
>
>
Does Firebird have an SQL "Limit" command like MySQL has (or can you give me
an idea of implementing a similar SQL statement with firebird). Limit in
case it's not obvious, "limits" the number of rows sent down the wire on
your query. Very useful if you get lots of rows returned during normal,
simple queries.
Lets say you perform a query and it returns 100 records, but you only want
to see "5" at a time.
MySQL would be select * from mytable limit 1, 5 //start at row 1, return 5.
Next "page" would be select * from mytable limit 6, 5 //start at row 6,
return 5 rows.
etc.
I suppose I could make a fake colum, increment it's value, and do a sub
select on it? Does that sound possible?
thanks,
Curt
"Tony Caduto" <aca...@amsoftwaredesign.com> wrote in message
news:3de7...@newsgroups.borland.com...
no clue but, I have been using MySQL for years and have had no issues.
--
Lawrence "Zen" Thurman
http://www.powerofzen.com
"Curt Krueger" <ckru...@NOSPAMinminnesota.com> wrote in message
news:3dec...@newsgroups.borland.com...
I'm on an extremly tight budget (probably like many people) and can't afford
to shell out $500.00 per CPU on the server and or a client cost. So I'm now
investigating Firebird. Once my product makes money, I'd have no problem
sharing the wealth!
Maybe I'm miss-understanding the license? Suggestions?
Thanks,
Curt
"Lawrence Thurman" <lthu...@columbus.rr.com> wrote in message
InterBase 6.5 and 7 do.
For What's new in IB 7, see:
http://www.dbginc.com/tech_pprs/ib7/IB7.htm
http://www.borland.com/interbase/pdf/ib7_whatsnew.pdf
SELECT [TRANSACTION transaction]
[DISTINCT | ALL]
{* | <val> [, <val> …]}
[INTO :var [, :var …]]
FROM <tableref> [, <tableref> …]
[WHERE <search_condition>]
[GROUP BY col [COLLATE collation] [, col [COLLATE collation] …]
[HAVING <search_condition>]
[UNION [ALL] <select_expr>]
[PLAN <plan_expr>]
[ORDER BY <order_list>]
[ROWS <value> [TO <upper_value>] [BY <step_value>][PERCENT][WITH TIES]]
[FOR UPDATE [OF col [, col …]]];
For this part:
ROWS <value>
[TO <upper_value>]
[BY <step_value>]
[PERCENT][WITH TIES]
This is more info:
- value is the total number of rows to return if used by itself
- value is the starting row number to return if used with TO
- value is the percent if used with PERCENT
- upper_value is the last row or highest percent to return
- If step_value = n, returns every nth row, or n percent rows
- PERCENT causes all previous ROWS values to be interpreted as percents
- WITH TIES returns additional duplicate rows when the last value in the
ordered sequence is the same as values in subsequent rows of the result set;
must be used in conjunction with ORDER BY
I have found it to be very comprehensive, powerful, and flexible
--
John Kaster, Borland Developer Relations, http://bdn.borland.com
$1280/$50K: http://homepages.borland.com/jkaster/tnt/thanks.html
Make a wish: http://qc.borland.com * Get source http://codecentral.borland.com
John forgot to add that Firebird now also supports a ROWS command of this
type, in fact it supported it before IB7 came out, IIRC.
--
"So what are we going to do tonight, Jake?"
"Same thing we do every night, Jake's Super Newsreader. TRY TO TAKE OVER THE
WORLD!"
To be accurate, IB 6.5 introduced this (and it is much more powerful and
flexible than the FB version) and IB6.5 was released some 5-6 months before FB
1.0.
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Maybe it was infatuation or the thrill of the chase.
Maybe you were always beyond my reach and my heart was playing safe.
But was that love in your eye I saw or the reflection of mine?
Give me time, won't you give me that time!
Welcome back to the circus. (Fish)
Right. I didn't say otherwise, but I wasn't clear.
> flexible than the FB version) and IB6.5 was released some 5-6 months before FB
> 1.0.
I don't know anything about FB features, so I couldn't comment there. Didn't
intend to mislead anyone.
Depends on your needs. MySQL is much faster than Firebird. I don't like it
too but if I need a simple SQL server maybe I'll use it.
I like MySQL, but it is missing features that Firebird and PostgreSQL have.
Brad