Database - Introduction to SQL - Discussion
Discussion Forum : Introduction to SQL - General Questions (Q.No. 5)
5.
The wildcard in a WHERE clause is useful when?
Discussion:
16 comments Page 2 of 2.
Sirisha said:
1 decade ago
What is meant by wildcard can you explain clearly?
Peru said:
1 decade ago
SQL wildcards can substitute for one or more characters when searching for data in a database.
SQL wildcards must be used with the SQL LIKE operator.
With SQL,
% A substitute for zero or more characters
_ A substitute for exactly one character
SELECT * FROM Persons
WHERE City LIKE 'sa%'
it will select the row where the city name starts with sa..
SQL wildcards must be used with the SQL LIKE operator.
With SQL,
% A substitute for zero or more characters
_ A substitute for exactly one character
SELECT * FROM Persons
WHERE City LIKE 'sa%'
it will select the row where the city name starts with sa..
Khushboo jain said:
1 decade ago
Please give the answer in more detail.
Jaba said:
1 decade ago
Wildcard chars are used to replace any substring.for eg if you want to write a query to get the names which starts with s, we can write it as select * from employee where name LIKE "s%" and - replace single character.
L.Srinivas said:
1 decade ago
Can you elaborate in detail please.
Anil said:
1 decade ago
In case of char variables the exact match may not be possible. In those cases we use % wildcard.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers