Q:

Write a postgreSQL statement to create a simple table countries, including columns country_id,country_name and region_id which already exist

0

Write a postgreSQL statement to create a simple table countries, including columns country_id,country_name and region_id which already exist.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

CREATE TABLE countries ( 
COUNTRY_ID varchar(3),
COUNTRY_NAME varchar(45) ,
REGION_ID decimal(10,0)
);

Output:

Here is the output for the above SQL statement. The following output shows an error message, because the table already exists.

postgres=# CREATE TABLE countries (
postgres(# COUNTRY_ID varchar(3),
postgres(# COUNTRY_NAME varchar(45),
postgres(# REGION_ID decimal(10,0)
postgres(# );
ERROR:  relation "countries" already exists

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now