Sam Carleton wrote:
> In other databases there have been times when I have played some tricks with
> the master tables, an example is:
>
> Goal: change some fundamental characteristics of 'target_table' which cannot
> be done by an ALTER
>
> 1: Create the new table with a different name: target_
On Sun, Jun 27, 2010 at 07:41:48PM -0400, Sam Carleton scratched on the wall:
> 1: Create the new table with a different name: target_table2 with the changes
> 2: Do an insert/select to insert the contents of target_table into
> target_table2
> 3: Drop target_table
> 4: Modify the master table to
In other databases there have been times when I have played some tricks with
the master tables, an example is:
Goal: change some fundamental characteristics of 'target_table' which cannot
be done by an ALTER
1: Create the new table with a different name: target_table2 with the
changes
2: Do an in
atabase"
> Cc: "Kelvin Xu"
> Sent: Thursday, October 15, 2009 10:28:23 AM GMT -06:00 US/Canada Central
> Subject: Re: [sqlite] Replacing a table
>
> I guess you didn't work with SQL anywhere in your developer life,
> right? Read some books or internet pages
Pavel Ivanov wrote:
>
>
> To update column in all rows of the table you need to issue the
> following statement:
>
> UPDATE table_name SET column_name = value
>
And note that the "value" above does not have to be a constant. It can,
for instance, depend on other values in the row being up
uot;General Discussion of SQLite Database"
Cc: "Kelvin Xu"
Sent: Thursday, October 15, 2009 10:28:23 AM GMT -06:00 US/Canada Central
Subject: Re: [sqlite] Replacing a table
I guess you didn't work with SQL anywhere in your developer life,
right? Read some books or internet
en O'Neill"
> To: "General Discussion of SQLite Database"
> Sent: Thursday, October 15, 2009 9:59:32 AM GMT -06:00 US/Canada Central
> Subject: Re: [sqlite] Replacing a table
>
>
> Run the sql
> 'delete from "tablename";'
>
> if t
-boun...@sqlite.org] On Behalf Of Kavita Raghunathan
Sent: Thursday, October 15, 2009 4:22 PM
To: General Discussion of SQLite Database
Cc: Kelvin Xu
Subject: Re: [sqlite] Replacing a table
Thanks Pavel and Owen. This is very useful information.
Also how can we change a whole column at a time ?
In oth
- Original Message -
From: "Owen O'Neill"
To: "General Discussion of SQLite Database"
Sent: Thursday, October 15, 2009 9:59:32 AM GMT -06:00 US/Canada Central
Subject: Re: [sqlite] Replacing a table
Run the sql
'delete from "tablename";'
if the ta
, 2009 3:51 PM
To: General Discussion of SQLite Database
Cc: Kelvin Xu
Subject: [sqlite] Replacing a table
Hi,
Is there a way to use the sqlite wrappers to "replace" or delete a table
completely ?
(without looping through and deleting each row and column)
The number of columns and rows of t
> Is there a quick way to do that?
DROP TABLE table1;
ALTER TABLE table2 RENAME TO table1;
And doesn't matter how many rows and columns have each of the tables.
Hope I've understood your question correctly.
Pavel
On Thu, Oct 15, 2009 at 10:51 AM, Kavita Raghunathan
wrote:
> Hi,
>
> Is there a
Hi,
Is there a way to use the sqlite wrappers to "replace" or delete a table
completely ?
(without looping through and deleting each row and column)
The number of columns and rows of the new table is identical to the number
of columns and rows of the old table being replaced. Is there a quick wa
12 matches
Mail list logo