0
Wanted to select range of records based on initial characters of the employee name?
String initialChar=sc.next()+"%"; What is this% do there???
2 Antworten
+ 3
The '%' character just ignores whatever is in there. For example if you want to look for a name which starts with 'p' from the employee table then you must say-
Select name from employee
where name like "p%";
+ 1
% Represents zero or more characters
bl% finds
bl, black, blue, and blob
https://www.w3schools.com/sql/sql_wildcards.asp