Please help!! How do I INSERT INTO lots of inforamtion at one time in SQL?
-
Hello, Can you please show me using the following inforamtion HOW to INSERT INTO a table all the data at one time ...I tried it and it only lets me insert one persons info. at a time and Im trying to learn SQL. Thanks!! Here is what I tried to do, is this wrong and were ? Thanks Insert into Yahoo_00025 (first,last,title,age) Values ( 'lucy','ricardo','actress',40),('ethel',… Can you please tell me what Im doing wrong ? Thanks so much :)
-
Answer:
If you're using constants you need an insert statment for every record. If the data is in another table you would use and insert with a select. INSERT INTO T1 (F1,F2) SELECT F1,F2 FROM T2
Thalassa... at Yahoo! Answers Visit the source
Other answers
That's just how it works. You can use a SELECT INTO statement if you are inserting data from one table into another, or a CURSOR for a similar purpose. Otherwise, your front end application will typically use a loop to run INSERT statements one-by-one. If you needed to do a bulk load of data into a table, you'd be better off using a Data Transformation Services task.
What DBMS (and the version) are you using? Try this Insert into Yahoo_00025 (first,last,title,age) select 'lucy', 'ricardo', 'actress', 40 UNION ALL select 'ethel',... ...
Related Q & A:
- How can I insert posted data into the database?Best solution by Stack Overflow
- How can I insert image in my Yahoo profile?Best solution by Yahoo! Answers
- How do I insert my photo in my messenger?Best solution by Yahoo! Answers
- How can I insert HTML into my Yahoo Group description?Best solution by Yahoo! Answers
- Please help - how do I delete a profile?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.