Last post Oct 08, 2013 12:47 AM by Mikesdotnetting
Oct 07, 2013 08:49 PM|robuc33|LINK
Hi, can anyone tell me how i can add/delete a COLUMN in an existing table in my Compact SQL db using a script only? I am using the default compact SQL database that comes with Webmatric-3. Thanks.
Oct 07, 2013 09:03 PM|Afzaal.Ahmad.Zeeshan|LINK
You can add/delete from a COLUMN in SqlCe.
And I don't think you can create tables or columns in SqlCe, however try this: http://technet.microsoft.com/en-us/library/ms345331.aspx
I think this would help.
Oct 08, 2013 12:47 AM|Mikesdotnetting|LINK
var sql = "ALTER TABLE MyTable ADD COLUMN MyColumn nvarchar(100)"; db.Execute(sql);
var sql = "ALTER TABLE MyTable DROP COLUMN MyColumn";db.Execute(sql)