Click here to Skip to main content
15,894,410 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys,

can anyone help me in this.


I have a table in sqlite database which consists of 61249 rows in that i just need 873 rows rest of the rows have to be deleted. I tried it by using loops concept but unfortunately. I am using dbbrowser sqlite to access this database. we cant use loops here can any one solve this.
Posted

If you're talking about this DBBrowser[^] you can execute SQL-statements with it. So you would have to identify a column-criterion by which you can specify the rows that should be deleted and then execute a DELETE-statement.

See:
https://www.sqlite.org/lang_delete.html[^]
http://www.tutorialspoint.com/sqlite/sqlite_delete_query.htm[^]

Example:
SQL
DELETE FROM tablename WHERE column1 < 100 OR column1 > 900
 
Share this answer
 
The Logic is simple.

delete from tablename where id>873
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900