Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26
  1. #11

    sakto jud c dlanyer77, nganong e.alter man nga gusto man sa TS nga ebutang sa tunga2x sa City ug COuntry...

    kung e.alter daghan pa kaau ug process para makuha nimo ang gus2 sa TS...

    abir, ipha ang lines para makakuha ka sa gus2 sa TS...

    peace bro... pero ang sak2 jud nga paagi is to recreate the TABLE...

  2. #12
    if the TABLE has existing data, would recreating the table be the correct solution?

    Assuming that the TABLE has 10,000 records already would you risk using dlanyer77's solution?

    Spoiler: dlanyer77's solution 

    Code:
    --RECREATE THE TABLE and here's the simple script that might help you.
    
    drop table PRACTICE_SQL101;
    
    create table PRACTICE_SQL101
    (
    P_ID NUMBER(10) NOT NULL,
    LNAME	 VARCHAR2(15),
    FNAME	 VARCHAR2(15),
    CITY VARCHAR2(10),
    ZIP_CODE	 NUMBER(10),
    COUNTRY VARCHAR2(10)
    );

    If you consider that answer, and you want to take the risk of loosing all the data, then go ahead, drop and recreate that TABLE.

    Still the best answer is ALTER TABLE command.

    I don't have a job, and I'm not making a career out of this, If you think I'm wrong then trust in dlanyer77's solution in recreating the TABLE.
    Last edited by ChaosOrb; 12-08-2008 at 05:58 PM.

  3. #13
    Quote Originally Posted by ChaosOrb View Post
    if the TABLE has existing data, would recreating the table be the correct solution?

    Assuming that the TABLE has 10,000 records already would you risk using dlanyer77's solution?

    If you consider that answer, and you want to take the risk of loosing all the data, then go ahead, drop and recreate that TABLE.

    Still the best answer is ALTER TABLE command.

    I don't have a job, and I'm not making a career out of this, If you think I'm wrong then trust in dlanyer77's solution in recreating the TABLE.
    Hey! I’m not running for election here. Our thread starter can choose freely. I’m just trying to help and I’m not trying to amplify things to make my solution the best. I think you don’t get it bro. He is practicing right? From that standpoint do you think he has an application that’s executing a DML that made you think that there’s an existing data? If there was then why would I gave him that kind of solution. Your intuition is a fine beginning, but a lousy conclusion.

    Have a nice day!

  4. #14
    I say no more......you win! bow ko nmo boss! I have a lousy conclusion.
    Last edited by ChaosOrb; 12-08-2008 at 08:32 PM.

  5. #15
    Quote Originally Posted by ChaosOrb View Post
    I say no more......you win!
    Peace bro! Advance Merry Christmas!

  6. #16
    hey! yaw mo pag away ui. sakto mo tanan. inyo mga solution tanan pwede na sila.

    before nimo idrop ang table, mag create sa ka temporary table nga with sakto ang column na imo gusto. then insert nimo data from original table, to temporary table
    like "insert into temptable1(column1,column2,column3) select field1,field2,field3 from originaltable..."
    then pwede na nimo madrop ang original table then rename the temptable to the name of the original table.

    pwede sd ang ALTER TABLE if walai data ang table.

    peace ^_^

  7. #17

    Lightbulb adding new column in TABLE using sql ;->

    hello to each and everyone

    and thanks really for all the good inputs that has been shared about my post. in fact, i would like to ask an apology for taking such time in updating my post.

    and yes, my table has already data inputted in it. that's why i have request for an assistance how to insert a column between the 2-existing column (City and Country).

    honestly, i really made it a point to leave that space lacking of a Zip Code since i want to practice how to add later, as well, what probable command or syntax can i used then.

    besides, i wouldn't ask if i know the answer. afterall, i understand that almost one of us are pre-occupied with other stuff. its just that somehow, considering i'm a beginner ... i accept that i also explore other possibilities. i'm sure that many will react again about my message ... perhaps making a comment that i should not make it difficult at this early stage knowing i'm still in the level I.

    well, kindly just assist me since in the end ... its not me only who will benefit my inquiry. i guess that their are many out there who are learning too


    once again, thanks really for the big help.


    cheers!

  8. #18
    I use 2 approach, recreate and ALTER TABLE, I only recreate if the table is blank and no one is using the table, this is kind of hard to do considering the database traffic in my work place, so I use ALTER TABLE instead, but I have to be tolerant with the order of fields. Recreating will be a problem if you have foreign keys.

  9. #19
    create ug laing mirror table, i copy ang source nga table to new table, drop the old table, make a new table with the new column, then explicit ug specify ang values inig insert into new table command.... not sure lang nuon ha....

  10. #20
    @anggwaponi

    The correctness of our response to your query is likely related to the ambiguity of the content in your original post. For example, do you have existing data or what's your database?

    If you mean something else, perhaps be more specific next time bro.

  11.    Advertisement

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

 
  1. Hot New EVENT in CEBU
    By khaos_stalker in forum Parties & Events
    Replies: 1
    Last Post: 08-26-2015, 09:46 PM
  2. For Sale: hp mini 110-3700 NEW - week in use 15k
    By johndesc in forum Computers & Accessories
    Replies: 1
    Last Post: 07-30-2011, 11:19 PM
  3. new bigs in mactan
    By jonz in forum Business, Finance & Economics Discussions
    Replies: 81
    Last Post: 10-11-2009, 08:38 PM
  4. New Tapsilogan in Opon
    By vudz in forum Food & Dining
    Replies: 11
    Last Post: 02-06-2009, 04:13 PM
  5. HOW TO CONNECT SQL SERVER USING SQL AUTHENTICATION
    By edshark in forum Software & Games (Old)
    Replies: 13
    Last Post: 09-02-2005, 04:53 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top