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?
An exact match is necessary in a SELECT statement.
An exact match is not possible in a SELECT statement.
An exact match is necessary in a CREATE statement.
An exact match is not possible in a CREATE statement.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
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..

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:

Your comments will be displayed after verification.