Jump to content

SQLite Queries


autoitxp
 Share

Recommended Posts

Hi i decided to share some usefull sqlite Queries to get date fast

To count all records :

select COUNT(*) from mytable;

To get singal row or many you want : best and very fast for me

SELECT * FROM  mytable ORDER BY rowid DESC limit 1  offset 0;

this will show 20 to 10 records order by ASC

SELECT * FROM  mytable ORDER BY rowid ASC limit 10  offset 20;

if you have any good queries to get data fast share it

Regards

Sim

Edited by autoitxp
Link to comment
Share on other sites

Heres a quick one resulting from some help from Psalty when I first started learning Autoit (Update Query)

$sExec = "UPDATE Users SET Department='Marketing' WHERE User_Name='" & $UserName & "'" ; Change a record
If _SQLite_Exec($hDB, $sExec) = $SQLITE_OK Then ConsoleWrite("Debug:  Successfully updated a record." & @LF)
Edited by Hatcheda
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...