Results 1 to 4 of 4

Thread: Restrictions with Alter command

  1. #1
    Contributing Member
    Join Date
    May 2006
    Answers
    71

    Restrictions with Alter command

    The alter table name command is used for altering columns. Is there any restrictions for using this command. If so can anyone specify the restrictions associated for these command.


  2. #2
    Expert Member
    Join Date
    May 2006
    Answers
    114

    Re: Restrictions with Alter command

    It is possible to add new columns to the existing table using ALTER TABLE but if you want the new column top be defined as NOT NULL; it is possible only if the table has no rows. Also one more restriction is if one wants to decrease the precision of the column using ALTER TABLE then column to be modified must be empty.


  3. #3
    Junior Member
    Join Date
    Aug 2007
    Answers
    15

    Re: Restrictions with Alter command

    Quote Originally Posted by RyanJames View Post
    It is possible to add new columns to the existing table using ALTER TABLE but if you want the new column top be defined as NOT NULL; it is possible only if the table has no rows. Also one more restriction is if one wants to decrease the precision of the column using ALTER TABLE then column to be modified must be empty.
    I guess in the second case the column to be modified needn't be empty i.e. till the moment the new precision value isn't less than the existing column values we can modify that column.

    Correct me if i am wrong.


  4. #4
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Restrictions with Alter command

    Yes, if one wants to decrease the precision of the NUMBER type column using ALTER TABLE command then column to be modified must be empty.


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
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact