Chiedo aiuto - Add column if not exists c#
Ciao a tutti, scusate ma sto impazzendo, forse per niente, per
scrivere un'istruzione SQL che aggiunga una colonna ad una tabella se la colonna non esiste già.
ho scritto una funzione che esegue i comandi SQL e ho passato questa stringa :
U.EseguiComandoSQL("IF NOT EXISTS (SELECT * FROM GETROTO.COLUMNS WHERE TABLE_NAME = 'aperture' AND COLUMN_NAME = 'PuntoDiRiferimento') BEGIN ALTER TABLE aperture ADD PuntoDiRiferimento DATETIME END");
Non mi va.
Dov'è l'errore?? Oppure come si fa? Grazie
Ciao
Filippo
Subject
Views
Written By
Posted
Chiedo aiuto - Add column if not exists c#
3493
February 21, 2011 02:28AM
2474
March 09, 2011 07:04PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.