On 2/05/2009 9:13 PM, Ernany wrote:
> Hello John,
>
> I have 2 tables ("pcprod" and "pcdesc"). I´d like to *add *in my application
> "MARCA" and "DESCR".
>
> This code is VB2005 .NET. How do I write SQL???
You already have columns named "descr" and "marca" in the "pcprod"
table. You need to add them only to the "pcdesc" table.
To do this, you need to use the ALTER TABLE statement:
ALTER TABLE pcdesc ADD COLUMN descr NVARCHAR(40);
ALTER TABLE pcdesc ADD COLUMN marca NVARCHAR(20);
Do please read all of this:
http://www.sqlite.org/lang_altertable.html
especially the last sentence ("After ADD COLUMN has been run on a
database, that database will not be readable by SQLite version 3.1.3 and
earlier.").
What version of SQLite are you using?
After you have defined the new columns, your SELECT statement should no
longer give you an error message ... but you still need to populate
those columns.
I do hope this helps this time :-)
Cheers,
John
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users