How do I insert a record in a column having varchar data type having single quote in it?
Example:
first name is ROBERT and last name is D'COSTA
Solution:
Use Double Quotes
Example:
first name is ROBERT and last name is D'COSTA
Solution:
Use Double Quotes
SQL> SELECT 'D''COSTA' name FROM DUAL;
NAME
-------
D'COSTA
Alternatively use quoting method (oracle 10g+ )SQL> SELECT q'$D'COSTA$' NAME FROM DUAL;
NAME
-------
D'COSTA
No comments:
Post a Comment