I need to update a table where the table column is of varchar2
datatype and need to update the value of columns with '%'
.
for example --
create table test (id number, name varchar2(20));
insert into test values (1, 'smith');
insert into test values (2, 'allen');
Now we need to update the values in NAME column to smith'%'
So it should also include the single quotes in the string.
I am able to update it to smith% but it should be smith'%'
update test
set name = 'smith'||'''%'''
where id = 1;
SQL Error: ORA-00911: invalid character