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 utility for parm lib
What os does db2 run on?
Can there be more than one cursor open for any program?
What is the picture clause of null indicator variable?
Explain the contents that are a part of dclgen.
What does reorg do in db2?
Is db2 free?
What is meant by dclgen?
What is buffer pool and list some of them?
How is a typical db2 batch pgm executed?
If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?
What is db2 look?
What do you mean by between and in? Is between inclusive of specified range values?
can we view the access paths created by dbrm ? how ? thx
What is explain in db2?