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
How to execute stored procedures?
Explain about cursor stability?
Can we insert update delete in view?
What is the reason behind not using select * in embedded sql programs?
How to find primary key of a table in db2?
What is the role of data manager in the db2 database?
What is data manager?
What is universal database?
what is db2 restart?
Where do you specify them?
List out the data types available.
Name the lockable units in DB2?
What is the difference between cursor and select statement?
What is isolation level in db2?
What is a trigger in the db2 database?