Computer scienceFundamentalsSQL and DatabasesBasics SQLData Definition Language

CHECK constraint

Update statement

Report a typo

CREATE TABLE inventory (
    id VARCHAR(18) PRIMARY KEY,
    description VARCHAR(40),
    cost DECIMAL(10,2 ) NOT NULL CHECK (cost > 0),
    price DECIMAL(10,2) NOT NULL CHECK (price > 0)
);
insert into inventory values(1, 'Tesla', 200, 350);

Which of the following insert statements will throw an error?

Select one or more options from the list
___

Create a free account to access the full topic