7

I am trying to create a table in PostgreSQL, but I am getting an error create table bond ([Coupon.Type] varchar(35),[Coupon.Index] varchar(35),[Tranche.1] varchar(35),[Tranche.2] varchar(35)) I have tried removing the "[" and as Coupon.Type,also "Coupon.Type" but nothing works.

ERROR: syntax error at or near "[" LINE 1: Room varchar(35),(Coupon.Type) varchar(35),[Coupon.Index] va...

1
  • @AlexK. I have used the quotes but its not working Commented Jun 28, 2017 at 15:36

1 Answer 1

12

This will work

create table bond ( "Coupon.Type" varchar(35) ,"Coupon.Index" varchar(35) ,"Tranche.1" varchar(35) ,"Tranche.2" varchar(35) ) 
Sign up to request clarification or add additional context in comments.

2 Comments

It worked, thank you @Anuraag
Double quotes also works when selecting a column with a dot.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.