Tuesday, December 16, 2014

How to enter & as a string in Insert statements in oracle SQL

If we need to enter & as a string in any SQL insert or query , Oracle asks for a new value .. To over come this , we have below solution :

1. select 'hi s this is how to enter &'||' as string in SQL ' from dual;

2. select 'hi s this is how to enter '|| '&' ||' as string in SQL ' from dual;

3. use following and run as a script :

set define off scan off
select 'hi s this is how to enter & as string in SQL ' from dual;

No comments:

Post a Comment