Can someone tell me how to change the currency option for a price field? I am enrolled in Nelson’s SQL course (Amigos Code) and in his video, there is a none option where the USD and other currencies are listed. When I use Nelson’s instruction to change the VARCHAR type to NUMERIC in Visual Studio App, I can run a MAX price query, but not run an AVG query when using the car file. I receive a syntax error for type numeric on all 1000 lines.
Here is each line of code. I think it is the pricing line that is generating the error, but I am using Nelson’s instructions step-by-step.
create table car (
id BIGSERIAL NOT NULL PRIMARY KEY,
car_make VARCHAR(100) NOT NULL,
car_model VARCHAR(100) NOT NULL,
pricing NUMERIC(19, 2) NOT NULL
);