skip to Main Content

I have already created table .I want to add one more string column into it.

ALTER TABLE test."persons" 
ADD COLUMN RightName VARCHAR(150);

Column get added in table with name rightname.

Why this is so,why not RightName?Any thing I missed.
Do I need to specify length for varchar column.

2

Answers


  1. Try:

    ALTER TABLE test."persons" 
    ADD COLUMN "RightName" VARCHAR(150);
    
    Login or Signup to reply.
  2. In PostgreSQL it’s better to use "RightName" when u adding a new column to already created table by a SQL code (use quotes)

    Or u can add "RightName" column in properties of your table by hands

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search