Database - Introduction to SQL - Discussion
Discussion Forum : Introduction to SQL - General Questions (Q.No. 11)
11.
The SQL keyword(s) ________ is used with wildcards.
Discussion:
14 comments Page 1 of 2.
Gayatri said:
9 years ago
A wildcard character can be used to substitute for any other character(s) in a string. SQL wildcards are used to search for data within a table.
For Example1:
SELECT * FROM Customers
WHERE City LIKE 'ber%';
//Displays table containing city starting with Ber...//
For Example2:
SELECT * FROM Customers
WHERE City LIKE '%es%';
//Displays table containing city ending with es...//
For Example1:
SELECT * FROM Customers
WHERE City LIKE 'ber%';
//Displays table containing city starting with Ber...//
For Example2:
SELECT * FROM Customers
WHERE City LIKE '%es%';
//Displays table containing city ending with es...//
(3)
Divya said:
1 decade ago
If you want to select persons name from persons table ending with d and starting with m,
Then use the syntax like this,
select * from PERSONS where personname like 'm%d';
Ex: mad, mohammad, married, mustard, etc.,
And to retrieve persons name where 5th letter is d and 7th letter is s and after s you can have any characters, then use,
select * from PERSONS where personname like '_ _ _ _ d_s%'
Ex: kalidas.
Then use the syntax like this,
select * from PERSONS where personname like 'm%d';
Ex: mad, mohammad, married, mustard, etc.,
And to retrieve persons name where 5th letter is d and 7th letter is s and after s you can have any characters, then use,
select * from PERSONS where personname like '_ _ _ _ d_s%'
Ex: kalidas.
(2)
Lalitha said:
1 decade ago
This notes really help to know about wild cards in SQL.
(1)
Ramesh said:
9 years ago
Wildcard is special character is represent to another character.
Like as run* -->then result get out run, runing, runs.
Like as run* -->then result get out run, runing, runs.
(1)
Mani said:
1 decade ago
Wildcard means?
Neha goyal said:
1 decade ago
What is wildcard ?
BabuRao said:
1 decade ago
Wildcard means %text enclosed with single quote.
ex: cname like '%BU'
ex: cname like '%BU'
Prabhakar said:
1 decade ago
Thanks it is useful.
Bipin said:
1 decade ago
Wildcard means %text enclosed with single quote.
Shikha said:
1 decade ago
Yes @baburao and @bipin explained this very closely. Thats right and I agree with them.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers