Add a column in the table if it does not exist in sqlite

advertisements

I want to add one extra column in my table. Can anybody tell me how to add column in Table if its not exists in sqlite updating whole sqlite database ?

if COLUMNPROPERTY( OBJECT_ID('Customers'),'CLable','Text') is null
    begin
        alter table Customers add CLable varchar(50) not null
    end


try like this ,by using ALTER command you can achieve this one ,

ALTER TABLE Name ADD COLUMN new_column INTEGER DEFAULT 0