Oracle insert ampersand
Oracle insert &
insert ampersand into a table
SQL> create table anuj (text varchar2(100));
Table created.
SQL> insert into anuj values ('Vihaan & singh');
Enter value for singh:
1 row created.
SQL> select * from anuj;
TEXT
---------------------------------------
Vihaan
1 row selected.
SQL> set define off
SQL> insert into anuj values ('Vihaan & singh');
1 row created.
SQL> select * from anuj;
TEXT
-------------------------------------------
Vihaan
Vihaan & singh
2 rows selected.
SQL> set define on
SQL> set escape \
SQL> insert into anuj values ('Vihaan \& singh');
1 row created.
SQL> insert into anuj values ('Vihaan &'||'singh');
1 row created.
SQL> select * from anuj;
TEXT
---------------------------------------------
Vihaan
Vihaan & singh
Vihaan & singh
3 rows selected.
Search This Blog
Total Pageviews
Thursday, 24 November 2011
Subscribe to:
Post Comments (Atom)
Oracle DBA
anuj blog Archive
- ▼ 2011 (362)
No comments:
Post a Comment