Database-MySQL [3i Infotech Placement]: Sample Questions 82 - 82 of 162

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 82

Edit

Appeared in Year: 2006

Describe in Detail

Essay▾

How to convert RAW datatype into TEXT?

Explanation

We can use Bulk copy program (BCP) to convert a data from row to text or text to row.

BCP:

  • The bcp utility is a command-line tool that uses the Bulk Copy Program (BCP) API to bulk copy data between an instance of SQL Server and a data file.
  • By using the utility, you can export data from a SQL Server database into a data file, import data from a data file into a SQL Server database, and generate format files that support importing and exporting operations.
  • To use the bcp utility to perform these tasks, you can run a bcp command (along with the appropriate arguments) at a Command Prompt window.
  • The command should conform to the following syntax:

    bcp {table|view| “query” }

    {out|queryout|in|format}

    {data_file|nul}

    { [optional_argument] …}

  • When you run a bcp command, you must specify one of the following four modes:
  • out: The command exports data from a table or view into a data file.
  • queryout: The command exports data retrieved through a query into a data file.
  • in: The command imports data from a data file into a table or view.
  • format: The command creates a format file based on a table or view. (Format files are explained later in the article.)

Developed by: