Database [3i Infotech Placement]: Sample Questions 162 - 164 of 294

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

Question 162

Database
Edit

Describe in Detail

Essay▾

What is the use of the DROP option in the ALTER TABLE command?

Explanation

  • DROP option can be used to drop a col from table.
  • For example, ALTER TABLE tname DROP COLUMN colName.
  • The column may or not contain data.
  • The table must have at least one column remaining after being altered.
  • Once a column is dropped, it cannot be recovered.

Syntax:

ALTER TABLE table_name

DROP COLUMN column_name;

Question 163

Database

Question

MCQ▾

GET_BLOCK property is a

Choices

Choice (4)

a.

Library function

b.

Restricted procedure

c.

Unrestricted procedure

d.

None of the above

Answer

d.

Explanation

Define Query Info a Runtime
  • GET_BLOCK property returns information of a specific block
  • Must issue a call to the built-in once for all property value to retrieve.

Syntax

FUNCTION GET_BLOCK_PROPERTY

(block_id Block, Property NUMBER) ;

FUNCTION GET_BLOCK_PROPERTY

(block_name VARCHAR2,

property NUMBER) ;

Where,

block_id: The unique ID from builder assigned to the block during creation.

block_name: The name block during creation.

Property: Specifies various constants to return information about given block.

Question 164

Database
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: