How do I add more than one column to a table using SQL?

Hi
I need to add 3 columns to a table using SQL
the syntax
"ALTER TABLE TEST ADD COLUMN newcol1 float";
works fine - for adding one coumn only.
For multiple columns I tried various permutations along the lines of
"ALTER TABLE TEST ADD (COLUMN newcol01 float, COLUMN new2 float,COLUMN new3 float)";
"ALTER TABLE TIPSTEST ADD COLUMN new1 float"
"ALTER TABLE TIPSTEST ADD COLUMN new2 float"
"ALTER TABLE TIPSTEST ADD COLUMN new3 float"
etc., but this doesn't work.
From a web search it sounds like SQL can only add one column at a time.
I have a workaround : create intermediate temporary tables , copying data and adding
one column at each stage. It seems a fairly awkward way of programming though.
Am I missing something simple : is there a way to add multiple columns in one go?
Thanks

OK : solved an underlying problem with this one myself
for the code
String createString;
createString =  "select COFFEES.* INTO NEWCOFFEES FROM COFFEES"; // example
          Statement stmt;
          try {
               stmt = a_Globals.database1Connection.createStatement();
                      stmt.executeUpdate(createString);
               stmt.close();
               a_Globals.database1Connection.close();
          } catch(SQLException ex) {
               System.err.println("SQLException: " + ex.getMessage());
          }                    commenting out the line:
a_Globals.database1Connection.close();
Allowed the subsequent SQL statement(s) to work OK. Looks like this was the cause of several
difficulties, preventing me doing several SQL instructions in turn.
Thanks for the responses.
Mike2z

Similar Messages

  • How do you add more than one song to library.....

    How do you add more than one song to the library using the "Add File to Library" option? I just upgraded to itunes 7.1.1.5 from an early version and used to be able to do this but now it want let me, it only lets me add one song at a time. I don't want to use the "Add Folder" option because it adds m3u playists and all kinds of things I don't want to be in my library. Is this a glitch? because it doesn't make sense.

    When using the "add file to library" feature, hold down the CNTL (control) button as you pick your songs...
    DON'T RELEASE THE BUTTON UNTIL YOU HAVE SLECTED ALL THE SONGS...
    then just hit hit the button to add them a voila

  • How can I add more than one same spry menu (eg. collapsible menu)  with in different styles (font size, color, background, etc) on current page?

    How can I add more than one same spry menu (eg. collapsible menu)  with in different styles (font size, color, background, etc) on current page?

    Hi Nancy,
    This screenshot was only for imagination. A part of the code (not all) is below.  In the code there are some background images but they are not seem in live mode.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="css/my_site.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css"/>
    <link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
    <style>
    #CollapsiblePanel1 .CollapsiblePanelOpen .CollapsiblePanelTab {
        background-color: #003366;
        font-size: 18px;
        line-height: 52px;
        color: #FFF;
    #CollapsiblePanel1 .CollapsiblePanelTabHover .CollapsiblePanelTab {
        background-color: #003366;
        color: #FFF;
        text-shadow: 1px 1px #000;
        font-weight: bold;
        line-height: 52px;
    #CollapsiblePanel1 .CollapsiblePanelClosed .CollapsiblePanelTab  {
        background-color: #C3CFDF;
        border-radius: 5px 5px 0px 0px;
        color: #999
        text-shadow: 1px 1px #000;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        font-size: 18px;
        font-weight: bold;
        line-height: 52px;
    #CollapsiblePanel2 .CollapsiblePanelOpen .CollapsiblePanelTab {
        background-image: url(images/international.jpg);
        background-repeat: no-repeat;
        font-size: 18px;
        line-height: 52px;
        color: #FFF;
    #CollapsiblePanel2 .CollapsiblePanelTabHover .CollapsiblePanelTab {
        background-color: #003366;
        color: #FFF;
        text-shadow: 1px 1px #000;
        font-weight: bold;
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel2 .CollapsiblePanelClosed .CollapsiblePanelTab  {
        background-color: #C3CFDF;
        border-radius: 5px 5px 0px 0px;
        color: #999
        text-shadow: 1px 1px #000;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        font-size: 18px;
        font-weight: bold;
        background-image: url(images/TR_Gray2-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel2 .CollapsiblePanelContent {
        background-color: blue;
    #CollapsiblePanel3 .CollapsiblePanelOpen .CollapsiblePanelTab {
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        font-size: 18px;
        line-height: 52px;
        color: #FFF;
    #CollapsiblePanel3 .CollapsiblePanelTabHover .CollapsiblePanelTab {
        background-color: #003366;
        color: #FFF;
        text-shadow: 1px 1px #000;
        font-weight: bold;
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel3 .CollapsiblePanelClosed .CollapsiblePanelTab  {
        background-color: #C3CFDF;
        border-radius: 5px 5px 0px 0px;
        color: #999
        text-shadow: 1px 1px #000;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        font-size: 18px;
        font-weight: bold;
        background-image: url(images/TR_Gray2-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel4 .CollapsiblePanelOpen .CollapsiblePanelTab {
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        font-size: 18px;
        line-height: 52px;
        color: #FFF;
    #CollapsiblePanel4 .CollapsiblePanelTabHover .CollapsiblePanelTab {
        background-color: #003366;
        color: #FFF;
        text-shadow: 1px 1px #000;
        font-weight: bold;
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel4 .CollapsiblePanelClosed .CollapsiblePanelTab  {
        background-color: #C3CFDF;
        border-radius: 5px 5px 0px 0px;
        color: #999
        text-shadow: 1px 1px #000;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        font-size: 18px;
        font-weight: bold;
        background-image: url(images/TR_Gray2-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel5 .CollapsiblePanelOpen .CollapsiblePanelTab {
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        font-size: 18px;
        line-height: 52px;
        color: #FFF;
    #CollapsiblePanel5 .CollapsiblePanelTabHover .CollapsiblePanelTab {
        background-color: #003366;
        color: #FFF;
        text-shadow: 1px 1px #000;
        font-weight: bold;
        background-image: url(images/TR_Col-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    #CollapsiblePanel5 .CollapsiblePanelClosed .CollapsiblePanelTab  {
        background-color: #C3CFDF;
        border-radius: 5px 5px 0px 0px;
        color: #999
        text-shadow: 1px 1px #000;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        font-size: 18px;
        font-weight: bold;
        background-image: url(images/TR_Gray2-WEB.png);
        background-repeat: no-repeat;
        line-height: 52px;
    </style>

  • How do I add more than one picture on a page?

    I just started using Lightroom, and I want to know how I can add more than one picture onto a page to print or email. Right now, I will choose a picture, and it will make all of the pictures on the page that picture. I have even tried dragging a picture onto a page, but it just changes all of the pictures to the dragged picture.
    Thanks.

    It can be done in Lightroom 2 but, as John pointed out, it requires a 'hack.'  Here is how it's done:
    http://lightroomkillertips.com/2009/video-multi-photo-picture-packages/

  • How do i add more than one pdf at a time to profile manager books

    How do I add more than one pdf at a time to profile manager books? When I browse to my pdf folder I can only select one pdf at a time. I have 500+ pdf files I need to add. Any help would be greatly appreciated.

    Bucknut wrote:
    I want to add more than one email address to my address book from an email I received. They were in the CC of the email I received. is there anyway to drag them all into an address book group all at once. I hate having to add and address and then having to find the address and then add it to a group. thanks
    no, there is no way to do that, sorry. you need to control-click on every email address one at a time and select "add to address book". if an email is in the address book already that option will not be there.

  • How do I add more than one video per track/layer?

    Hi.
    Could someone please advise me how I can add more than one video to a track/layer?
    I'm cutting and pasting parts and each time I paste, a new track/layer is added.
    The final video is going to be approximately 5 minutes long.
    I am 17 seconds in and have 54 tracks already!
    How do I stop this?
    Thank you very much
    J

    More video tracks. This is actually what you want.
    Unless you're just making a still image (like Photoshop), multiple layers give you control to animate each individually. (If it's just a Photoshop comp you're after, you may want to create it in Photoshop)
    If you want to move ALL OF THE VIDEO TRACKS TOGETHER, you can use
    parenting or
    precompose those individual layers into a single composition.
    livedocs

  • How do I add more than one song to slideshow music? (was BG)

    How to add more than one song to slideshow music?

    You can't use multiple tracks. Merging them into one, using something like Audacity is the way to go. http://audacity.sourceforge.net/

  • How can I add more than one submit button in a jsp without use of javascrip

    I want to add more than one submit button in a jsp without use of javascript

    you can do add multiple submit button with this way
    <input type="submit" value="Previous" />
    <input type="submit" value="Next" />
    <input type="submit" value="Finish" />

  • How can I add more than one song to fit the length of the slideshow

    I would like to add more than one song to my slideshow. I do not want to repeat the same song more than once. Is there a way to add more than one song to a slideshow?

    Great - unfortunately it is not intutative - but simple - once you know the secret - and at least in iphoto '08 it acts like you can select multiple songs using the command key but it only plays the first one
    LN

  • Help. how do I add more than one address at a time?

    I want to add more than one email address to my address book from an email I received. They were in the CC of the email I received. is there anyway to drag them all into an address book group all at once. I hate having to add and address and then having to find the address and then add it to a group. thanks

    Bucknut wrote:
    I want to add more than one email address to my address book from an email I received. They were in the CC of the email I received. is there anyway to drag them all into an address book group all at once. I hate having to add and address and then having to find the address and then add it to a group. thanks
    no, there is no way to do that, sorry. you need to control-click on every email address one at a time and select "add to address book". if an email is in the address book already that option will not be there.

  • How to bring the more than one rows from the table into the script

    Hi
    I have to bring more than one rows from the table into the Main windows of the script. so plz help me out.
    Thanks in Advance
    Ananya

    Hi Ananya,
       Bring more than one row into main window of script.
       For this you need to do some changes for data which you pass to main window.At a time you need to pass more than one row,so for this you need to define one structure.See below code.
    Types:begin of ty_rows,
         include structure (your row_structure),
         include structure (your row_sturcture),
    Types:end of ty_rows.
    for example....
    If i need to pass 2 vendor details at a time to main window then the structure should be like this.
    Types:begin of ty_rows,
           vendor1 like lfa1-lifnr,
           vendor1_name like lfa1-name1,
           vendor2 like lfa1-lifnr,
           vendor2_name like lfa1-name1,
          end of ty_rows.
    Data:i_main type standard table of ty_rows,
         wa_main type ty_rows.
    Based on condition you can pass more than one rows of your actual internal table data to i_main internal table.
    Then you can pass i_main internal table to your main window.
        I think this will help you.
    Cheers,
    Bujji

  • How do I add more than one quiz to a project?

    In Captivate 7 help it mentions you should be sure to name your quizzes because it will help you keep track of them when you have more than one in the same project. However, I cannot find any information on how to add a second quiz to the same project.

    Welcome to the forum,
    Could you tell where this is mentioned in the Help? I believe due to SCORM standards only one quiz per file is possible. Only thing that changed since Captivate 6 is the possibility to add a Pretest. The result of a pretest can be used to take decisions like branching, but is not meant as a real quiz.
    What will be reported, what is stored in the quizzing system variables is always for the totality of the file. You could track results of some questions and show them in the file. Have a look at:
    http://blog.lilybiri.com/intermediate-score-slides
    I don't think this is what you want?
    Lilybiri

  • How do I add more than one photo albums to the Ipad2

    I have an Ipad2. I can transfer a photo album from my computer to the Ipad, but when I try to add another album, the first album gets wiped off the Ipad2. How can I install/copy/synch more than one photo album on Ipad2

    Sounds like you are a Windows user or if you are a Mac user, you are manually managing photo storage on your computer without using a photo management application like iPhoto.
    Create a parent folder which will contain the separate albums or folders of photos only that you want transferred to your iPad. Select the parent folder under the Photos tab for your iPad sync preferences with iTunes.
    To remove an entire album or folder of photos from your iPad, move the album or folder of photos out of the parent folder on your computer's hard drive followed by a sync. To remove an individual photo from your iPad without removing the entire album or folder of photos, move the photo from the album or folder of photos on your computer followed by a sync. To add another album or folder of photos to your iPad, place the album or folder of photos in the parent folder followed by a sync.

  • How do I add more than one device to one iCloud account without the device?

    I have a device that was lost and I am trying to add devices to my iCloud so that they can access Find My iPhone but I am the only line on my iCloud. How can I add the devices to my iCloud without accessing the devices?

    First, update it to the most recent version > http://support.apple.com/kb/HT4623 Then, open Settings > iCloud, login with your Apple ID and activate Find my iPhone. If the child is using iCloud, he/she'll lose all her/his data, so you have to turn off each service in order to keep her/his contacts, notes, etc.

  • How do I add more than one song to a slide show

    What if I have a long slide show (300+) and want to have two or three or ... more songs on it? Any one know how I would do this? PS - This is my first ever post on a forum.

    Create a single track out of the multiple songs using audio editing software. Try audacity (free) or if you have a mac, use garage band.

Maybe you are looking for

  • Get Tax Code from PO to service entry sheet in ML81N

    Hello, I am looking for a suitable user exit/Badi, which would get the Tax code from Purchase Order to Service Entry Sheet (ML81N). Currently user changing the tax code manually in service number line item (ML81N). Here is the process we are followin

  • Ethernet interface disappears after waking up from sleep

    Hi guys, I've been trying to debug a networking problem without any luck and I think it's about time I ask the forum for help. My ethernet interface no longer works after I wake up my computer from sleep. I have no idea why. Before sleep: # ls /sys/c

  • Mobile based clients disconnecting frequently

    Hi folks, I have an 1142 running 15.2.2JB.  I noticed numerous messages of clients disconnecting with the following message: %DOT11-6-DISASSOC: Interface Dot11Radio0, Deauthenticating Station 847a.885b.622c Reason: Previous authentication no longer v

  • Ph/conductivity meter vi or information

    I am trying to have labview 7.0 read and record (to excel) pH/conductivity/temp from a thermo-orion 550A multimeter. I have used hyperterminal to communicate with unit, however, would like to encorporate into LV. I am converting RS232 to USB and the

  • Where do you get the meial address to complain about really poor service

    Where do i get the email address to complain about very very poor service in Bristol uk