Sign in to follow this  
Followers 0
faustf

sqlite which select must use?

8 posts in this topic

hi guy

i have a table with 26 column and 10 line

i wanna extract the line number 5

which select must use ?

in example i see only if i wanna estract all columns or specific column for all line

http://www.w3schools.com/sql/sql_select.asp

Share this post


Link to post
Share on other sites



Does your table have a primary key?

Share this post


Link to post
Share on other sites

yea

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

If you have an autoincremental key, named for example P_Id, you can do something like that:

SELECT * FROM my_table WHERE P_Id = 5

Hi!

Edited by Nessie

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Share this post


Link to post
Share on other sites

o thankz Nessie i will try :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Beware that your question has no definite answer as it is stated. SQL has no concept of default ordering, so that "line number 5" has no meaning at all.

What show at "line number 5" only depends on the ordering you specified in the query and lacking an order by clause, SQL is entitled to deliver rows in whatever crazy order it chooses at runtime.

Without an order by clause, SQL may very well return rows in different order for successive runs of the exact same query even if no other activity is taking place on the database during this time.

The short answer to your question is "the same query you would use in MySQL".

Edited by jchd

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

thankz go perfect :)

Share this post


Link to post
Share on other sites

Have you used this?:

SELECT * FROM my_table WHERE P_Id = 5

Hi!


My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0