2

I created the table but I am not able to insert the polygon coordinates.

I tried the following, but it didn't work.

create table TEST5(
fig_name char(10),
fig_color char(10),
circle_loc circle,
polygon_loc polygon);

insert into TEST5(fig_name,fig_color,polygon_loc) 
values 
('poly' , 'red', POLYGON(POINT(9,3),POINT(9,9),POINT(5,9),POINT(5,3));
Arshad Shaikh
  • 23
  • 1
  • 4

1 Answers1

4

Polygon definition is not correct, please try like this:

insert into TEST5
   (fig_name,fig_color,polygon_loc)
values ('poly' , 'red',  '((9,3),(9,9),(5,9),(5,3))');

https://www.db-fiddle.com/f/7nfuwnxp4Un3VBLTXDars3/0

Pelin
  • 936
  • 5
  • 12