SQL Wildcards

OBJECTIVE

In this chapter you will learn:

About wildcard
Example of wildcard

 

About wildcard

SQL wildcard statement is used with like statement to retrieve the specific data from the records. You can display records according to your requirement with the help of wildcards.

Example of wildcard

% (percent)-
It matches one or more characters and retrieve the matching value
_ (Underscore)-
If any one character matches then the data or value will retrieve otherwise no

Example 1

like statement example
Note:-

In the given example 1, % is wildcard which is used with like statement to retrieve selected data from database.
Example 2

like statement example2
Note:-

In the given example 2,%% is also a wildcard which is used with like statement to retrieve selected data from database.

SUMMARY

In this chapter you have learned about wildcard so now it’s your responsibility to use this statement for your practice. In the next chapter you will learn about aliases.

 


Leave a Reply

Your email address will not be published. Required fields are marked *