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
Explain the contention situations caused by locks?
What is the cobol picture clause of the db2 data types date, time, timestamp?
What is host variable in db2 cobol?
Is db2 relational database?
What are catalog tables in db2?
How can you do the explain of a dynamic sql statement?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
While unloading huge amount of data from table. Suddenly job failed some error. Imagine 1M data unloading, In that 90% data unloaded only 10% left, So if want to unload the rest 10% what needs to be done? Whether do i need to start from top or anything ?
What is image copy in db2?
What is the use of predicate?
What is isolation level in db2?
What is cursor in dbms?
How to take backup of table in db2?
What is the physical storage length of the data types date, time, and timestamp?
What is the use of value function?