How to use the % sign in SQL Server
SQL SERVER : % sign/Get value by character in a column
Lets us see how to use the SQL % sign to find the particular character or string value from the single column from table. Following is the syntax for % sign and examples given for the reference and DIY use.
Description
This % sign is mainly useful in finding the desired character with a sequence in the result set for a SELECT statement in SQL SERVER.
Syntax: % sign
The syntax in the SQL Server for the % sign is as following :
SELECT aFROM table1WHERE expression like '%abc'
The % sign can be used with the following Arguments and the parameters. So here we are having list of the Arguments and Parameters to be use:----
1.WHERE conditions
Conditions is only applied when to get the records to be selected.
2.Like operator
% sign is used with the Like in a sql query where one want to get the result of a defined string or character string.
3.expressions or Column value
- The set or particular columns to be retrieved from the table in SQL Result set.
- 4.tables
- The tables from where one wants to retrieve the Detail or result from. There should be at least a table or single table in the FROM clause in the SQL Query.
Note
- The % sign is used only with the Like operator in the result set of the SQL Query.

0comments
Post a Comment