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.
Comments
10g:internet+grid computing & recycle bin & varchar 4000
11c:cloud computing(any place u access the data with the help of internet).............i am student of mithun sir but not get any SQL interview call....
Thank you for sharing useful information, sir, you really save my time!
Richard Brown secure dataroom
In tabe a column x I have below value
('A','c')
But subquery is not recognising above value.
Select * from table where f=(select a from abovetable)
Any idea?
In tabe a column x I have below value
('A','c')
But subquery is not recognising above value.
Select * from table where f=(select a from abovetable)
Any idea?