Re: [sqlite] TRUNCATE TABLE alias for DELETE FROM

2012-10-22 Thread Simon Slavin
On 22 Oct 2012, at 8:35pm, Paul van Helden wrote: >> It would be possible to implement TRUNCATE TABLE on top of that, but >> this would be only syntactic sugar. > > ..or better portability. TRUNCATE TABLE works (since only a few years) > nearly everywhere. So when writing

Re: [sqlite] TRUNCATE TABLE alias for DELETE FROM

2012-10-22 Thread Kees Nuyt
On Mon, 22 Oct 2012 16:44:12 -0400, Guillaume Saumure wrote: >. Anyway Something I can >do with >PureBasic is : > >Procedure.b TruncateDatabaseTable(DataBaseID.l, TableName.s) > > If DatabaseUpdate(DatabaseID, "TRUNCATE TABLE " + TableName) > Protected Success.b =

Re: [sqlite] TRUNCATE TABLE alias for DELETE FROM

2012-10-22 Thread Igor Tandetnik
On 10/22/2012 4:44 PM, Guillaume Saumure wrote: Personally, I have ask the question why TRUNCATE TABLE don't work because this command is not listed on http://www.sqlite.org/omitted.html This site list the non-supported feature of SQL92 standard and TRUNCATE TABLE is not listed so it should

Re: [sqlite] TRUNCATE TABLE alias for DELETE FROM

2012-10-22 Thread Duquette, William H (318K)
On 10/22/12 1:44 PM, "Guillaume Saumure" wrote: >Le 2012-10-22 15:35, Paul van Helden a écrit : >>> It would be possible to implement TRUNCATE TABLE on top of that, but >>> this would be only syntactic sugar. >>> >> ..or better portability. TRUNCATE TABLE works (since

Re: [sqlite] TRUNCATE TABLE alias for DELETE FROM

2012-10-22 Thread Guillaume Saumure
Le 2012-10-22 15:35, Paul van Helden a écrit : It would be possible to implement TRUNCATE TABLE on top of that, but this would be only syntactic sugar. ..or better portability. TRUNCATE TABLE works (since only a few years) nearly everywhere. So when writing portable applications it seems a bit

Re: [sqlite] TRUNCATE TABLE alias for DELETE FROM

2012-10-22 Thread Paul van Helden
> > It would be possible to implement TRUNCATE TABLE on top of that, but > this would be only syntactic sugar. > ..or better portability. TRUNCATE TABLE works (since only a few years) nearly everywhere. So when writing portable applications it seems a bit silly to make an exception for SQLite if

Re: [sqlite] TRUNCATE TABLE alias for DELETE FROM

2012-10-22 Thread giris
Thanks. Good to know. From: Clemens Ladisch <clem...@ladisch.de> To: sqlite-users@sqlite.org Sent: Monday, October 22, 2012 1:02 PM Subject: Re: [sqlite] TRUNCATE TABLE alias for DELETE FROM giris wrote: > Rather, the implementation/internals of SQ

Re: [sqlite] TRUNCATE TABLE alias for DELETE FROM

2012-10-22 Thread Clemens Ladisch
giris wrote: > Rather, the implementation/internals of SQLite need to change to allow this > very low overhead form of DELETE. Actually, SQLite already implements the low-overhead from of DELETE. src/delete.c has in sqlite3DeleteFrom(): #ifndef SQLITE_OMIT_TRUNCATE_OPTIMIZATION /* Special

Re: [sqlite] TRUNCATE TABLE alias for DELETE FROM

2012-10-22 Thread giris
of SQLite. HTH. Thanks. From: Paul van Helden <p...@planetgis.co.za> To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Sent: Monday, October 22, 2012 11:10 AM Subject: [sqlite] TRUNCATE TABLE alias for DELETE FROM Hi, TRUNCATE

[sqlite] TRUNCATE TABLE alias for DELETE FROM

2012-10-22 Thread Paul van Helden
Hi, TRUNCATE TABLE is now in the SQL:2008 standard. http://en.wikipedia.org/wiki/Truncate_(SQL) It would make portability easier if SQLite understood TRUNCATE TABLE to be the same as DELETE FROM without WHERE. Yes? No? Paul. ___ sqlite-users mailing