[sqlite] Why "TRUNCATE TABLE" can't empty a table?

2012-08-14 Thread daedae11
Following is my program:
rc = sqlite3_exec(db, "TRUNCATE TABLE students;", NULL, NULL, &errMsg);

but this sentence can success and return 1.
Help~
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Why "TRUNCATE TABLE" can't empty a table?

2012-08-14 Thread Dan Kennedy

On 08/14/2012 02:04 PM, daedae11 wrote:

Following is my program:
rc = sqlite3_exec(db, "TRUNCATE TABLE students;", NULL, NULL, &errMsg);


DELETE FROM students;

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Why "TRUNCATE TABLE" can't empty a table?

2012-08-16 Thread Brandon Pimenta
Use

DROP TABLE students;

That will permanently delete the table students. This is irreversible and
cannot be undone.

On Tue, Aug 14, 2012 at 4:06 AM, Dan Kennedy  wrote:

> On 08/14/2012 02:04 PM, daedae11 wrote:
>
>> Following is my program:
>> rc = sqlite3_exec(db, "TRUNCATE TABLE students;", NULL, NULL, &errMsg);
>>
>
> DELETE FROM students;
>
>
> __**_
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users