Re: [sqlite] select the first 2 rows

2009-04-02 Thread Shane Harrelson
Remember, the order of rows returned from a SELECT, even one with a LIMIT clause, is undefined, so the "first 2 rows" may not be consistently the same. If you are dependent upon the rows being returned in a particular order (say by "rowid"), you should include an ORDER BY clause on your SELECT to

Re: [sqlite] select the first 2 rows

2009-04-01 Thread Joanne Pham
Thanks Eric. Joanne   From: Eric Minbiole To: General Discussion of SQLite Database Sent: Wednesday, April 1, 2009 12:02:18 PM Subject: Re: [sqlite] select the first 2 rows > Hi all, > I have a big table and I want only select the first 2 rows. &g

Re: [sqlite] select the first 2 rows

2009-04-01 Thread Eric Minbiole
> Hi all, > I have a big table and I want only select the first 2 rows. > I have tried this : > select top 2 from table; > but it doesn't work! Any help please. > JP Use a LIMIT clause instead of TOP: SELECT * FROM table LIMIT 2; http://www.sqlite.org/lang_select.html ___

[sqlite] select the first 2 rows

2009-04-01 Thread Joanne Pham
Hi all, I have a big table and I want only select the first 2 rows. I have tried this : select top 2 from table; but it doesn't work! Any help please. JP ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman