Home » SQL & PL/SQL » Client Tools » How to insert values
How to insert values [message #627892] Mon, 17 November 2014 23:10 Go to next message
aaditya321
Messages: 225
Registered: January 2014
Location: Delhi
Senior Member
Hello Guys,

I want insert a values in table but not getting desire result, please help us.

Create table test (
                   state_name varchar2(20)
  );

  insert into test (State_name)
              values ('Jammu & Kashmir');

then output come: give & Kashmir Value:

While Jammu & Kashmir is a single state name, then please let me know that how to insert values (Jammu & Kashmir)

where I want output like:
select * from test;
State_name
-----------
Jammu & Kashmir
Re: How to insert values [message #627893 is a reply to message #627892] Mon, 17 November 2014 23:17 Go to previous messageGo to next message
BlackSwan
Messages: 25859
Registered: January 2009
Location: SoCal
Senior Member
it is OK for me.


SQL> Create table test (
                   state_name varchar2(20)
  );  2    3  

Table created.

SQL> insert into test (State_name)
              values ('Jammu & Kashmir');
  2  
1 row created.

SQL> commit;

Commit complete.

SQL> select * from test;

STATE_NAME
--------------------
Jammu & Kashmir

Re: How to insert values [message #627894 is a reply to message #627893] Mon, 17 November 2014 23:28 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3123
Registered: May 2013
Location: World Wide on the Web
Senior Member
Use
SET DEFINE OFF


SQL> set define off
SQL> drop table test purge;

Table dropped.

SQL> Create table test (
  2                     state_name varchar2(20)
  3    );

Table created.

SQL>
SQL>   INSERT INTO TEST (State_name)
  2                values ('Jammu & Kashmir');

1 row created.

SQL> select * from test;

STATE_NAME
--------------------
Jammu & Kashmir

SQL>



Regards,
Lalit
Re: How to insert values [message #627895 is a reply to message #627894] Mon, 17 November 2014 23:39 Go to previous messageGo to next message
aaditya321
Messages: 225
Registered: January 2014
Location: Delhi
Senior Member
Thank you so much Lalit & Swan.
Re: How to insert values [message #627897 is a reply to message #627894] Tue, 18 November 2014 00:25 Go to previous messageGo to next message
mist598
Messages: 1161
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:

Use
SET DEFINE OFF

How to do this in TOAD?
Re: How to insert values [message #627900 is a reply to message #627897] Tue, 18 November 2014 00:54 Go to previous messageGo to next message
Littlefoot
Messages: 21368
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Right-click in SQL Editor; you'll find it among numerous options ("Substitution variable prompting" or something like that).
Re: How to insert values [message #627901 is a reply to message #627900] Tue, 18 November 2014 01:01 Go to previous messageGo to next message
mist598
Messages: 1161
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:
Right-click in SQL Editor; you'll find it among numerous options ("Substitution variable prompting" or something like that).

Hi Littlefoot, thanks for reply and i have TOAD 10.6.1.3 Version and i am not getting where it is located can you please give me screen shot on this
Re: How to insert values [message #627902 is a reply to message #627901] Tue, 18 November 2014 01:05 Go to previous messageGo to next message
Littlefoot
Messages: 21368
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't have TOAD 10.6.1.3. I told you what to do. If you are unable to follow that simple instruction, there's nothing I can do about it.
Re: How to insert values [message #627904 is a reply to message #627902] Tue, 18 November 2014 01:11 Go to previous message
mist598
Messages: 1161
Registered: February 2013
Location: Hyderabad
Senior Member
Thanks Littlefoot got it ,that is Prompt For Substitution Variables unchecked
Previous Topic: Problem with Arabic language
Next Topic: Testing in SQL Developer
Goto Forum:
  


Current Time: Sun Feb 25 14:37:26 CST 2018

Total time taken to generate the page: 0.03673 seconds