The sqlite library included with PB doesn't fully support "Delete" command; however it looks like it may be sqlite "default" (the command line doesnt support it either)
SQLITEDoku wrote:If SQLite is compiled with the SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option, then the syntax of the DELETE statement is extended by the addition of optional ORDER BY and LIMIT clauses
other SQLite's here (dll,exe,..) does like the PB-Lib does.
Jassing,
I don't find this syntax in my SQL92 book but I see from your links that SQLite supports it ...
What exactly does this syntax do? Deletes the rows in the given order? Can you give a scenario where an ORDER BY in a DELETE is useful?
Thanks!
Jassing,
I don't find this syntax in my SQL92 book but I see from your links that SQLite supports it ...
What exactly does this syntax do? Deletes the rows in the given order? Can you give a scenario where an ORDER BY in a DELETE is useful?
I posted links to the sqlite documentation ...
I'm using it to delete the oldest ("top") x records to keep the database size from growing endlessly.
USCode wrote:Jassing,
I don't find this syntax in my SQL92 book but I see from your links that SQLite supports it ...
jassing wrote:I posted links to the sqlite documentation ...
Yes, I acknowledged that in my post.
jassing wrote:I'm using it to delete the oldest ("top") x records to keep the database size from growing endlessly.
Ah, interesting - that could be very useful, too bad it isn't supported by more DB engines. By using it you're limiting yourself to SQLite but if that's all you need it is handy!
Thanks
jassing wrote:I'm using it to delete the oldest ("top") x records to keep the database size from growing endlessly.
Ah, interesting - that could be very useful, too bad it isn't supported by more DB engines. By using it you're limiting yourself to SQLite but if that's all you need it is handy!
it's hard to use any database engine and not "get stuck with it" - any porting to a different engine can be done and queries adjusted...
Since this is an easy one to implement (set a flag and build the library) ... I've not seen any real performance or size hits from it, I'm not sure why it's not on by default...
The great thing about standards is there are so many to choose from...
Who cares, it's a very useful feature, doesn't force anyone to use it; and doesn't break existing queries...
Actually it's not "that easy" because we use the almagation file for better perf, and the flag isn't activable with it. So we would have to use the real sources and such, and i don't thuink it worth it for a non standard feature (the perf will be lower for everything else).
jassing wrote:The great thing about standards is there are so many to choose from...
Who cares, it's a very useful feature, doesn't force anyone to use it; and doesn't break existing queries...
Maybe you should be bringing this up with the SQLite team and ask them to make this the default behavior.