Home » SQL & PL/SQL » SQL & PL/SQL » Apostrophe in Sql
Apostrophe in Sql [message #18875] Tue, 19 February 2002 18:46 Go to next message
Shirish
Messages: 2
Registered: February 2002
Junior Member
Hi,
Can anyone help me how to select an apostrophe in a select statement.
eg: I want to select the text

This is Shirish's HomePage.
in Oracle.

Please help.
Re: Apostrophe in Sql [message #18881 is a reply to message #18875] Tue, 19 February 2002 23:33 Go to previous messageGo to next message
saquibzaheer
Messages: 3
Registered: February 2002
Junior Member
FOr reteriving

select * from emp
where ename like '%''%'
for inserting
insert into emp
(empno ,mgr,deptno,ename)
values ( '111',7369,10,'saq''s')
Re: Apostrophe in Sql [message #18888 is a reply to message #18875] Wed, 20 February 2002 03:43 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
Here is one more query:

select * from table1 where instr(col1,chr(39))>0;
Re: Apostrophe in Sql [message #18905 is a reply to message #18875] Wed, 20 February 2002 18:26 Go to previous message
Sudhakar Atmakuru
Messages: 58
Registered: May 2001
Member
Try this out.

SELECT 'This is Shirish''s Homepage' FROM DUAL;

(Just precede one apostrophe with another)

Good luck.
:)
Previous Topic: append leading zero's to data already in columns
Next Topic: Re: how to use audit command
Goto Forum:
  


Current Time: Thu Apr 25 16:38:20 CDT 2024