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

In mysql, what is the default storage engine?

510


What is difference between mysql_connect and mysql_pconnect?

557


How to convert numeric values to character strings?

524


how to show all records starting with the letters 'sonia' and the phone number '9876543210' limit to records 1 through 5.

523


How many concurrent queries can mysql handle?

477






What is the difference between unix timestamps and mysql timestamps?

515


What is a mysql server?

523


What is pragma autonomous_transaction?

470


Can mysql store files?

500


Explain % and _ inside like statement?

591


Does adding an index lock a table?

493


How can we encrypt and decrypt a data presented in a table using mysql?

556


how to add a new column to an existing table?

565


What is view? How can you create and drop view in mysql?

489


What is back end and front end?

470