Home > Blockchain >  Adding column in already created table in postgresql,make it lower
Adding column in already created table in postgresql,make it lower

Time:10-11

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.

CodePudding user response:

Try:

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

CodePudding user response:

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

  • Related