Page 135 - SQL
P. 135
Id FName LName PhoneNumber ManagerId DepartmentId Salary Hire_date
2000
Following statement matches for all records having FName containing string 'on' from Employees
Table.
SELECT * FROM Employees WHERE FName LIKE '%on%';
Id FName LName PhoneNumber ManagerId DepartmentId Salary Hire_date
06-08-
3 Ronny Smith 2462544026 2 1 600
2015
23-03-
4 Jon Sanchez 2454124602 1 1 400
2005
Following statement matches all records having PhoneNumber starting with string '246' from
Employees.
SELECT * FROM Employees WHERE PhoneNumber LIKE '246%';
Id FName LName PhoneNumber ManagerId DepartmentId Salary Hire_date
23-03-
1 John Johnson 2468101214 1 1 400
2005
06-08-
3 Ronny Smith 2462544026 2 1 600
2015
01-01-
5 Hilde Knag 2468021911 2 1 800
2000
Following statement matches all records having PhoneNumber ending with string '11' from
Employees.
SELECT * FROM Employees WHERE PhoneNumber LIKE '%11'
Id FName LName PhoneNumber ManagerId DepartmentId Salary Hire_date
11-01-
2 Sophie Amudsen 2479100211 1 1 400
2010
01-01-
5 Hilde Knag 2468021911 2 1 800
2000
All records where Fname 3rd character is 'n' from Employees.
https://riptutorial.com/ 117

