p5
Display all customers whose name start with ‘M’
➢ SELECT * FROM customers WHERE customer_name LIKE 'M%';
-
Display all the customers whose name ends with ‘L’
➢ SELECT * FROM customers WHERE customer_name LIKE '%L'; -
Display all loan details whose branch starts with ‘A’
➢ SELECT * FROM loans WHERE branch LIKE 'A%'; -
Display the details of sailors whose name is minimum 6 characters long.
➢ SELECT * FROM sailors WHERE sailor_name LIKE '_ _ _ _ _ _%'; -
Display the details of Employees whose address starts with ‘S’
➢ SELECT * FROM employees WHERE address LIKE 'S%'; -
List the details of the boat ending with ‘e’
➢ SELECT * FROM boats WHERE boat_name LIKE '%e'; -
List the details of clients having ‘h’ as a 3rd character in his/her name.
➢ SELECT * FROM clients WHERE client_name LIKE '_ _h%'; -
List Client Name, due balance and city whose pin code starts with 4.
➢ SELECT client_name, due_balance, city FROM clients WHERE pin_code LIKE '4%'; -
List all customers whose city contains ‘a’ as second character.
➢ SELECT * FROM customers WHERE city LIKE '_a%'; -
List client names and city whose state has ‘a’ as fourth or fifth character.
➢ SELECT client_name, city FROM clients WHERE state LIKE '_ _ a%' OR state LIKE ' _ _
_a%';