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
Here is the SQL query in Oracle to insert a record that contains a single quote:
SELECT Q' [D'COSTA] ' FROM DUAL;
or you can use two single quotes instead of single quotes.
SELECT 'D''COSTA' name FROM DUAL;
You can check out this SQL tutorial to learn the fundamentals of SQL and can check out this SQL Course to get expertise in SQL.