Generally if I want to select the names starting with c I
need to use c%
But how could I code to select the data which contains %
as a part of data.
Answer Posted / mdvasanth86
Anand is right.
SELECT * FROM table_name WHERE column_name LIKE 'C!%'
ESCAPE'!';
If you want to use % or _ as part of your like clause,
you must have an escape character before each occurrence of
% or _ and define what the escape character is like above.
So, an escape character before the % or _ will make it part
of the string rather than a wildcard character(S).
HTH
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is null indicator in cobol db2?
What are types of indexes?
Which component is used to execute the sql statements?
How do I add a column to an existing table in db2?
What is the use of with ur in db2?
What is the advantage in De-normalizing tables in DB2?
How does db2 sample database connect?
Give a brief description of db2 isolation levels?
What is cursor with hold option in db2?
Explain correlated sub-queries.
What do you mean by between and in? Is between inclusive of specified range values?
List down the data types in the db2 database.
What is meant by dclgen?
How to create db2 table in mainframe?
is it compulsory commitment control in journal?