autoitxp Posted November 25, 2007 Posted November 25, 2007 Hi which sqlite query is use to get first availble row like im using SELECT * FROM mytable where ID = 1; but in this query u have to tell id to pick row how i can get first availble row ? help !!!
xzaz Posted November 25, 2007 Posted November 25, 2007 What do you mean with "first availible"? The first record? Did you set the ID as primary key? Small Color Picker v0.2 | Travian bot
Impulse08 Posted November 25, 2007 Posted November 25, 2007 Hi which sqlite query is use to get first availble row like im using SELECT * FROM mytable where ID = 1; but in this query u have to tell id to pick row how i can get first availble row ? help !!! Why don't you do SELECT TOP 1 * FROM mytable where ID = 1;? Or just drop the WHERE altogether if that's what you're looking for. Hope this helps. -- If the apocalypse comes... beep me.
autoitxp Posted November 25, 2007 Author Posted November 25, 2007 well ya i want to pick 1 row without puting id =1 this is my primary key how can i get 1 row without using where clause
autoitxp Posted November 25, 2007 Author Posted November 25, 2007 well this not works for me where im doing mistake ?SELECT TOP 1 * FROM MYTABLE ;
Impulse08 Posted November 25, 2007 Posted November 25, 2007 well this not works for me where im doing mistake ?What error are you getting?SELECT TOP 1 * FROM MYTABLE;Should be the appropriate query to return only one row. -- If the apocalypse comes... beep me.
Xandl Posted November 25, 2007 Posted November 25, 2007 Hello, does "select * from mytable limit 1;" work as expected?
autoitxp Posted November 25, 2007 Author Posted November 25, 2007 (edited) ya i know this query but when i put limit 2 it start showing up 2 rows not only second row thats is problem for me i hope u got it SELECT TOP 1 * FROM MYTABLE; this is not for sqlite i think Edited November 25, 2007 by autoitxp
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now