Primary key assignment from sql file
I get an error when I type these codes from sql files. Why is that? what does the numeric function do?
CREATE TABLE items
(
item_code varchar(255),
item varchar(255),
unit_price numeric(10, 2),
company_id varchar(255),
primary key (item_code)
);
1 answers ( 0 marked as helpful)
Hi Maxime!
Great to have you in the course and thanks for reaching out!
I just managed to successfully execute the code you've posted. Therefore, the error you obtain does not come from the query itself.
Can you please support your question with a screenshot/screenshots containing the code and the error message you've obtained, so that we can assist you better. Thank you.
Looking forward to your answer.
Best,
Martin