New topic: 

SQL adding multi column in one statement

<http://forums.realsoftware.com/viewtopic.php?t=47700>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        Dralion          Post subject: SQL adding multi column in one 
statementPosted: Thu Apr 25, 2013 10:00 am                         
Joined: Sat Mar 15, 2008 8:14 am
Posts: 157
Location: Montreal, Quebec, Canada                Hi everyone
I'v read that i can add multi column to existing table in one statement
But i'v try many ways like.. comma...no comma..braket etc
the only way it work FOR the first of the col added is ALTER TABLE test ADD 
COLUMN AE Varchar AF Varchar AG Varchar AH Varchar AI Varchar AJ Varchar AK 
Varchar AL It only add the column AE and no error for the rest but no column 
either
a little help please
Thanks      
_________________
--------------------
RB 2011r4 on win7  
                             Top                Paul Lefebvre          Post 
subject: Re: SQL adding multi column in one statementPosted: Thu Apr 25, 2013 
10:19 am                       Site Admin                
Joined: Fri Sep 30, 2005 9:35 am
Posts: 971
Location: South Portland, Maine                What database are you using?

SQLite only allows you to add a single column at a time using ALTER TABLE ADD 
COLUMN.      
_________________
Paul Lefebvre
Developer Evangelist
Real Software, Inc.

The Real Studio Developer Conference is back: April 23rd-26th, 2013 in Orlando, 
FL.  
                             Top                Dralion          Post subject: 
Re: SQL adding multi column in one statementPosted: Thu Apr 25, 2013 1:00 pm    
                     
Joined: Sat Mar 15, 2008 8:14 am
Posts: 157
Location: Montreal, Quebec, Canada                sorry
im using RealSQL Database
and if its not possible...i have to do a loop ?
ALTER TABLE test ADD COLUMN AE Varchar
ALTER TABLE test ADD COLUMN AF Varchar
ALTER TABLE test ADD COLUMN AG Varchar
ALTER TABLE test ADD COLUMN AH Varchar
ALTER TABLE test ADD COLUMN AI Varchar
 Can i commit only once at the end of the loop?
Thanks      
_________________
--------------------
RB 2011r4 on win7  
                             Top                Paul Lefebvre          Post 
subject: Re: SQL adding multi column in one statementPosted: Thu Apr 25, 2013 
2:04 pm                       Site Admin                
Joined: Fri Sep 30, 2005 9:35 am
Posts: 971
Location: South Portland, Maine                Yes, that would work fine.      
_________________
Paul Lefebvre
Developer Evangelist
Real Software, Inc.

The Real Studio Developer Conference is back: April 23rd-26th, 2013 in Orlando, 
FL.  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to