[sqlite] Update in SQLite

2004-08-14 Thread cai yuan
Hi,
I would like to test the SQLite in some linux embedded system.
I read the limitation document and it says 
"To change a table you have to delete it (saving its contents to a temporary table) 
and recreate it from scratch." (Stated in http://www.hwaci.com/sw/sqlite/omitted.html)
Does it mean when I use the "UPDATE ..." SQL statement, the table will actually be 
deleted and recreated by SQLite automatically? 
Thanks!

Regards,
Cai Yuan

Re: [sqlite] Update in SQLite

2004-08-14 Thread David M. Cook
On Sun, Aug 15, 2004 at 01:28:05AM +0800, cai yuan wrote:

>"To change a table you have to delete it (saving its contents to a temporary
>table) and recreate it from scratch." (Stated in
>http://www.hwaci.com/sw/sqlite/omitted.html) Does it mean when I use the
>"UPDATE ..." SQL statement, the table will actually be deleted and recreated
>by SQLite automatically?  Thanks!

No, the docs are talking about altering the definition of a table, not
updating a row.

Dave Cook


Re: [sqlite] Update in SQLite

2004-08-14 Thread Scott Leighton
On Saturday 14 August 2004 10:28 am, cai yuan wrote:
> Hi,
> I would like to test the SQLite in some linux embedded system.
> I read the limitation document and it says
> "To change a table you have to delete it (saving its contents to a
> temporary table) and recreate it from scratch." (Stated in
> http://www.hwaci.com/sw/sqlite/omitted.html)

 That limitation refers to altering the structure of a table,
not changing the data in a table.

> Does it mean when I use the 
> "UPDATE ..." SQL statement, the table will actually be deleted and
> recreated by SQLite automatically? Thanks!

  No, update is an SQL statement used to change values stored 
in a row or rows in the table. It works on the 'data' stored 
in the table, not the table structure itself.

  Scott


-- 
POPFile, the OpenSource EMail Classifier
http://popfile.sourceforge.net/
Linux 2.6.5-7.104-default x86_64


Re: [sqlite] Update in SQLite

2004-08-15 Thread Darren Duncan
At 1:28 AM +0800 8/15/04, cai yuan wrote:
Hi,
I would like to test the SQLite in some linux embedded system.
I read the limitation document and it says
"To change a table you have to delete it (saving its contents to a 
temporary table) and recreate it from scratch." (Stated in 
http://www.hwaci.com/sw/sqlite/omitted.html)
Does it mean when I use the "UPDATE ..." SQL statement, the table 
will actually be deleted and recreated by SQLite automatically?
Thanks!

Regards,
Cai Yuan
UPDATE ... works fine.
ALTER ... is what does not work.  The comment you were looking at was 
talking about ALTER.

-- Darren Duncan


Re: [sqlite] Update in SQLite

2004-08-16 Thread cai yuan
Hi all,
Many thanks for your kindly reply. I will start using SQLite today.. ;-)

Cai Yuan
- Original Message - 
From: "Darren Duncan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 16, 2004 7:13 AM
Subject: Re: [sqlite] Update in SQLite


> At 1:28 AM +0800 8/15/04, cai yuan wrote:
> >Hi,
> >I would like to test the SQLite in some linux embedded system.
> >I read the limitation document and it says
> >"To change a table you have to delete it (saving its contents to a 
> >temporary table) and recreate it from scratch." (Stated in 
> >http://www.hwaci.com/sw/sqlite/omitted.html)
> >Does it mean when I use the "UPDATE ..." SQL statement, the table 
> >will actually be deleted and recreated by SQLite automatically?
> >Thanks!
> >
> >Regards,
> >Cai Yuan
> 
> UPDATE ... works fine.
> 
> ALTER ... is what does not work.  The comment you were looking at was 
> talking about ALTER.
> 
> -- Darren Duncan