Complete the code to convert the column 'price' to integer using CAST.
SELECT CAST(price AS [1]) FROM products;The CAST function changes the data type of 'price' to INT (integer).
Complete the code to convert the string '2023-01-01' to a DATE using CONVERT.
SELECT CONVERT([1], '2023-01-01', 23);
CONVERT changes the string to a DATE type using style 23 (ISO format).
Fix the error in the code to convert '123.45' to integer using CAST.
SELECT CAST('123.45' AS [1]);
CAST to INT truncates the decimal part, converting '123.45' to 123.
Fill both blanks to convert the column 'birthdate' to VARCHAR with length 10 using CONVERT.
SELECT CONVERT([1]([2]), birthdate, 23) FROM users;
CONVERT to VARCHAR(10) formats the date as a string of length 10.
Fill all three blanks to cast the column 'amount' to FLOAT and then convert it to VARCHAR with length 8.
SELECT CONVERT([1]([2]), CAST(amount AS [3])) FROM sales;
First CAST 'amount' to FLOAT, then CONVERT it to VARCHAR(8) for string output.