1

Hi In my application I am using SQLITE database,

I want to add multiple column in table,

If i am adding one column that work fine,

I am using ALTER table for add new column,

With this i am able to update one column,

ALTER TABLE "main"."tblCredit" ADD COLUMN "CardDetail" VARCHAR

But How can i add multiple column in tblCredit table.

dmg
  • 3,904
  • 1
  • 17
  • 21
Anki
  • 589
  • 2
  • 13
  • 22

2 Answers2

7

Use repeated calls to ALTER TABLE.

You should not have to do this too often anyway.

Mundi
  • 78,879
  • 17
  • 112
  • 137
  • 1
    Thanks for answer. But, We can't add the multiple column in one Alter query. Because i want add 5 column than i have to fire a 5 times alter query. – Anki Jun 18 '12 at 07:16
  • Correct. There is no other way. It is quite simple, really. Documentation [here](http://www.sqlite.org/lang_altertable.html). – Mundi Jun 18 '12 at 08:18
1

IN DB2 with the help of alter command add multiple column in table

ALTER TABLE TABLE_NAME ADD COLUMN F_NAME VARCHAR(30)
ADD COLUMN L_NAME VARCHAR(30)
ADD COLUMN ROLL_NO INTEGER
ADD COLUMN MOBILE_NUMBER VARCHAR(12);
Slava.K
  • 3,002
  • 3
  • 16
  • 28
Mohit
  • 129
  • 2
  • 3
  • 13