Complete the code to extract the first 3 characters from the column 'name'.
SELECT SUBSTRING(name, 1, [1]) AS short_name FROM employees;
The SUBSTRING function extracts a part of the string starting at position 1 for 3 characters.
Complete the code to extract 4 characters starting from the 2nd character in 'address'.
SELECT SUBSTRING(address, [1], 4) AS part_address FROM locations;
The start position is 2 to begin extraction from the second character.
Fix the error in the code to correctly extract 5 characters starting from the 3rd character in 'description'.
SELECT SUBSTRING(description, 3, [1]) AS snippet FROM products;
The length should be 5 to extract 5 characters starting at position 3.
Fill both blanks to extract 2 characters starting from the 4th character in 'code'.
SELECT SUBSTRING(code, [1], [2]) AS part_code FROM items;
The start position is 4 and length is 2 to get 2 characters from the 4th position.
Fill all three blanks to extract the last 3 characters from 'serial_number' assuming length is 10.
SELECT SUBSTRING(serial_number, [1], [2]) AS last_three FROM devices WHERE LENGTH(serial_number) = [3];
Start at position 8 to get last 3 characters (positions 8,9,10) when length is 10.