My database contains the following table:

m_Database.ExecNonQuery(_T("CREATE TABLE Vehicles (")
  _T("VehicleID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,")
  _T("FK_CustomerID INTEGER NOT NULL,")
  _T("VehicleNumber INTEGER NOT NULL,")
  _T("VehicleTitle TEXT,")
  _T("VehicleMake TEXT,")
  _T("VehicleModel TEXT,")
  _T("VehicleYear TEXT,")
  _T("VehicleVIN TEXT,")
  _T("VehicleDescription TEXT,")
  _T("Active INTEGER DEFAULT 1 NOT NULL,")
  _T("CreateDate DATE DEFAULT (date('now','localtime')) NOT NULL,")
  _T("UNIQUE (FK_CustomerID, VehicleID))"));

I would like to change the last line to instead be:

  _T("UNIQUE (FK_CustomerID, VehicleNumber))"));

Is there any way to make this change to the existing table without losing
data in the table?

Thanks for any suggestions!
-- 
View this message in context: 
http://www.nabble.com/How-to-Modify-Table-tp20474500p20474500.html
Sent from the SQLite mailing list archive at Nabble.com.

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

Reply via email to