Complete the code to define a column with a decimal type that stores numbers with 5 digits total and 2 digits after the decimal point.
CREATE TABLE prices (amount DECIMAL([1]));The DECIMAL(5,2) type stores numbers with up to 5 digits total, including 2 digits after the decimal point.
Complete the code to create a floating-point column that stores approximate values.
CREATE TABLE measurements (value [1]);FLOAT is a floating-point type that stores approximate numeric values.
Fix the error in the column definition to correctly store a decimal number with 7 digits total and 3 digits after the decimal point.
CREATE TABLE sales (total DECIMAL([1]));The correct syntax is DECIMAL(7,3) where 7 is total digits and 3 is digits after decimal.
Fill both blanks to create a table with a FLOAT column and a DECIMAL column with 6 digits total and 2 digits after the decimal point.
CREATE TABLE data (approximate [1], exact DECIMAL([2]));
FLOAT is used for approximate values, and DECIMAL(6,2) stores exact values with 6 digits total and 2 after the decimal.
Fill all three blanks to define a table with columns: price as DECIMAL(8,3), discount as FLOAT, and quantity as DECIMAL(5,0).
CREATE TABLE inventory (price DECIMAL([1]), discount [2], quantity DECIMAL([3]));
Price uses DECIMAL(8,3) for exact values with 3 decimals, discount uses FLOAT for approximate values, and quantity uses DECIMAL(5,0) for whole numbers.