How to load data from a text file into a table?

Answer Posted / nithya

use SQL LOADER.

type in ur command prompt:
> sqlldr

> sqlldr userid=user/password@DB_INSTANCE_NAME
control=import.ctl log=import.log data=import.csv

where u hav to convert ur text file into comma seperated
file(.csv) and ur control file must be:

load data

infile call_list.csv //data file

append

into table bck_up // db table name

fields terminated by ','

optionally enclosed by'"'

trailing nullcols
(
name,num,num2 //columns in ur text file.
)

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of myisam over innodb?

753


Is mysql good for big data?

685


How does triggers work in mysql?

705


Why mysql is so popular?

720


Explain the architecture models of SQL Server?

2104


How do I zip a file in mysql?

753


Can mysql scale horizontally?

735


How do I declare a variable in mysql?

694


What is full form of xampp?

820


What is myisam?

711


What is meant by sharding?

689


How do I setup a mysql database?

700


what is database white box testing? : Mysql dba

739


What is definer in mysql?

739


What are procedures in mysql?

714