Database - Introduction to SQL - Discussion

Discussion :: Introduction to SQL - General Questions (Q.No.18)


The SQL -92 wildcards are ____ and ____ .

[A]. asterisk (*); percent sign (%)
[B]. percent sign (%); underscore (_)
[C]. underscore(_); question mark (?)
[D]. question mark (?); asterisk (*)

Answer: Option B


No answer description available for this question.

Siva said: (Aug 2, 2011)  
Option 'a' is correct bcs * and % are used in sql.

Kiran said: (Aug 28, 2011)  
In Oracle, % (percentage) and _ (underscore) have a special meaning. These two wild card characters are used with LIKE operator:

% allows matching any string of any length (including zero length)
_ allows matching a single character

so the answer is B

Lokesh said: (Oct 14, 2011)  
Thanks kiran.

Madhu said: (Nov 6, 2011)  
I also agree with the answer of kiran that % is used for more dan one character match and _ is used for single character match.

Manoj Tiwari said: (Sep 30, 2012)  
In SQL, wildcard characters can be used in "LIKE" expressions; the percent sign (%) matches zero or more characters, and underscore (_) a single character.

Chandan said: (Oct 13, 2013)  
Actually when we want to match substring then we use % or pair of % as:

'sql%' this will return all results which starts with sql.

'%sql' will result in returning all string ending with sql.

'%sql%' having substring as sql.

Where we use '_' for character as:

'_' will return result which contains only one character in string.

'_ _ _ _' will return strings with exactly 4 characters

'sql_ _ _' will result in string which have exactly 3 characters followed by sql. i.e - 'sqltbl' and so on.

Mahesh said: (May 16, 2015)  
We use count (*) to count rows where * is the wildcard.

Pooja said: (Jul 17, 2015)  
Why we called % and _ are wildcard?

Bhajan said: (Feb 12, 2016)  
A is the right answer because in SQL-92 * and % both are used as identical wild card.

Ramesh said: (Feb 29, 2016)  
These two wildcards are imp in SQL.

% called as a Like operator.

Hrishi said: (Jan 4, 2017)  
What is SQL -92?

Shivam Rawat said: (Sep 24, 2020)  
Wildcards are used in SQL to match a string pattern. There are two types of wildcards: % (percent sign) represents zero, one, or more characters (underscore) represents exactly one character.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.