Forums Register Login

LIMIT in Hypersonic and MySQL.

+Pie Number of slices to send: Send
Hi,

I am currently looking at creating a database component that can be used with both Hypersonic and MYSQL. As I am required to execute large statments a need to use the limit SQL keyword.

I have notice a differance between Hypersonic and MySQL. In Hypersonic the syntax is:



However In MySQL the syntax for limit is:



So I can't send the same statements to both database.

I was wondering which one is the standard way for the LIMIT syntax.

Once I know the standard way this should be done I may start looking at the database code for the non-standard one. May even be able to make them both the same

Thanks

Chris.
+Pie Number of slices to send: Send
hi,
Hypersonic SQL is "In memory database".So it may not statisfy all the sandard SQL notations.

Thx and regards
-Srini
+Pie Number of slices to send: Send
curious argument
mySql doesn't have views and subqueries...

however - the postgresql looks a bit like mySql:


SQL isn't standardized that much, (a nuisance) - perhaps it's wise to look what the market-leader (oracle) is saying?
[ May 27, 2004: Message edited by: Stefan Wagner ]
+Pie Number of slices to send: Send
As long as i can remembered, the limit syntaxes differ from 1 vendor to another, ex mysql uses keyword limit, oracle uses the rownum function, etc.

It's almost impossible to use standard ways in persistence layer. Perhaps you should code different classes for different database/any other legacy systems, and plug the correct ones to the business process tier. Data Access Object, Inversion of Control/Abstract Factory and Factory pattern could do some help.

good luck to you ^^
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1913 times.
Similar Threads
Help with SQL
Please Point Out My Mistakes
Query -- select maximum salary in a sum table
Display the sequence numbers on the output rows of a select in Oracle 10g
SQL question: returning the posts between rank y and z
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:14:39.