Like with UPDATE Statement % (percent sign):
1) Update the city of those students whose Name starts with "S".
UPDATE Student SET City = 'Jaipur' WHERE Name LIKE 'S%';
Select * From Student Where Name LIKE 'S%' ;
2) Update the Marks of those students whose City name ends with "i"
UPDATE Student SET Marks = 70 WHERE City LIKE '%i';
Select * From Student Where City LIKE '%i';
3)Update the Marks of those students whose Name of the city starts with
"G" and ends with "d".
UPDATE Student SET Marks = 90 WHERE City LIKE 'G%d' ;
Select Roll_No, Marks, City From Student Where City LIKE 'G%d' ;
4)Update the City of those students of the above student table
whose Name contains the letter "a" in any position.
UPDATE Student SET City = 'Goa' WHERE Name LIKE '%a%' ;
Select * From Student Where Name LIKE '%a%' ;
Like with UPDATE Statement _ (underscore sign):
1) Update the salary of those employees whose Name contains "a" at the
second position.
UPDATE Employee SET Salary = 9000 WHERE Name LIKE '_a%' ;
Select * From Employee WHERE Name LIKE '_a%' ;
2) update the department of those employees whose name contains at
least 3 characters and starts with the letter "S"
UPDATE Employee SET Emp_Dept = 'Coding' WHERE Name LIKE 'S___%' ;
SELECT * FROM Employee WHERE Name LIKE 'S___%' ;
3) Update the Salary of those employees whose Emp_Dept is 2
Characters long and ends with the character 'R'.
UPDATE Employee SET Salary = 20000 WHERE Emp_Dept LIKE '_R' ;
SELECT * FROM Employee WHERE Name LIKE '_R' ;