Most of them have been asking me how do I display single quote in a select statement, here we go.
Single quotes are used to represent literal strings so one should always know how to handle them, Oracle provides different ways of handling single quotes.
1. If you want to begin and end with single quote,
SELECT '''hello how are you''' FROM DUAL;
'hello how are you'
Notice that you have to use 3 single quotes in the beginning and at the end.
2. If you want to display single quote in a using concatenation operator,
SELECT 'hi, how' || '''' || 's mithun' FROM DUAL;
hi, how's mithun
Notice that you have to use 4 single quotes here.
3. If you want to display single quote in between,
SELECT 'hey how''z dhruv doing' FROM DUAL;
hey how'z dhruv doing
Notice that you have to use 2 single quotes here.