Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2012
    Posts
    15

    Question Unanswered: SQL Error: ORA-01735: invalid ALTER TABLE option

    I am trying to alter the column name-

    Alter table Employee change ADDRESS address Varchar 100
    I am getting following error-
    SQL Error: ORA-01735: invalid ALTER TABLE option
    What should be the cause of error??????

  2. #2
    Join Date
    Mar 2007
    Posts
    623
    Quote Originally Posted by Shikhashah View Post
    What should be the cause of error??????
    It is stated in the Oracle response above: CHANGE is not valid option of ALTER TABLE statement.
    Maybe, before using any SQL statement, you should familiarize with its proper syntax instead of inventing your own.
    ALTER TABLE statement is described in SQL Language Reference book, which is available with other Oracle documentation books e.g. online on http://tahiti.oracle.com/
    Just pick the one for your Oracle version.
    Last edited by flyboy; 02-09-12 at 06:59. Reason: Added last sentence

  3. #3
    Join Date
    Jan 2012
    Posts
    15

    SQL Error: ORA-01735: invalid ALTER TABLE option

    Basically I want to change the column name to lowercase, I tried remaining the column but its not useful as it would take the duplicate columns.
    How can I change the column name to lowercase?

  4. #4
    Join Date
    Mar 2007
    Posts
    623
    Quote Originally Posted by Shikhashah View Post
    Basically I want to change the column name to lowercase, I tried remaining the column but its not useful as it would take the duplicate columns.
    Changing name = renaming. Not sure what you mean with "duplicate".
    Quote Originally Posted by Shikhashah View Post
    How can I change the column name to lowercase?
    Rename it. Oracle identifiers are case insensitive, interpreted as uppercase. When you want to use mixed case or include any special character except underscore (_), dollar sign ($) or pound sign (#), you have to put them between double quotes.
    Code:
    ALTER TABLE employee RENAME COLUMN address TO "address"
    Note that you will have to always use double quotes when referencing that column. Why do you want to do this at all????
    (yes, those four question marks are intentional, because it is really not a good idea. definitely not)

    You may read more facts about Oracle identifiers (they use the term "Object Names and Qualifiers", just search for it) in the same book I suggested you in the previous post.

  5. #5
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    Quote Originally Posted by flyboy View Post
    because it is really not a good idea. definitely not
    I couldn't agree more.

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
  •