Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Oracle/OAS
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Eclipse Collections Categorically: Level up your programming game
this week in the
Open Source Projects
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Oracle/OAS
insert multiple values into a single column
Romeo Ranjan
Ranch Hand
Posts: 95
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
I want to insert eight values(rows) into a single column of my table.How do i do that??
This INSERT statement allows to insert a single record or multiple records into a table.
INSERT INTO table (column-1, column-2, ... column-n) VALUES (value-1, value-2, ... value-n);
but what i want is
INSERT INTO table (column-1) VALUES (column-1value1,column-1value2,column-1value3,...,column-1value8);
How do i go about doing this??
Trying this format
SQL> insert into test sal values 2 (1000), 3 (1001), 4 (1002), 5 (1003), 6 (1004), 7 (1005), 8 (1006), 9 (1007) 10 ; (1000), * ERROR at line 2: ORA-00933: SQL command not properly ended
or
SQL> insert into test sal values 2 (1001,1002,1003,1004,1005,1006,1007,1008); insert into testhib sal values * ERROR at line 1: ORA-00913: too many values
gives me the following error.
SCJP 6.0
Sona Patel
Ranch Hand
Posts: 75
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Ranjan,
You will have to write different insert statements for all column values as below..
INSERT INTO table (column-1) VALUES (value-1); INSERT INTO table (column-1) VALUES (value-2); ---- INSERT INTO table (column-1) VALUES (value-n);
I am Arthur, King of the Britons. And this is a tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
can bind a LONG value only for insert into a LONG column
Decimal precision and scale
ORA-01403: no data found + Oracle + Trigger
EJB create not using default value for not null column
How to control Ora errors in program
More...