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 does reorg do in db2?
Explain about mirror activator disk mirroring?
What is dbrm? What it contains? When it will be created?
How do you stop a db2 database in linux?
What is database manager in db2?
What is rebind in db2?
What parameters are used to control the free space in DB2?
What is performance tuning db2?
What is the physical storage length of the data types date, time, and timestamp?
what is diffrence b/w file-aid tool and file-aid utility???
What is cursor with hold option in db2?
How can the firstname and the lastname from the emp table be concatenated to generate complete names?
What is check constraint. Explain with example.
What is ibm db2 connect?
What do you mean by rollback?