HP c-tree-SQL ISQL and Tools manual Isql Statements, Starting Interactive SQL, Syntax, Arguments

Models: c-tree-SQL ISQL and Tools

1 99
Download 99 pages 4.83 Kb
Page 27
Image 27

Chapter 3

ISQL Statements

3.1OVERVIEW

This chapter describes only those statements that are specific to ISQL. See the c-treeSQL Ref- erence Guide for detailed reference information on standard SQL statements that can be issued in other environments.

3.2STARTING INTERACTIVE SQL

Start ISQL by issuing the isql command at the shell prompt. c-treeSQL invokes ISQL and dis- plays the ISQL prompt:

$ isql sampledb

c-treeSQL Interactive Interpreter

ISQL>

Issue c-treeSQL statements at the ISQL> prompt and terminate them with a semicolon. You can continue statements on multiple lines. ISQL automatically prompts for continuation lines until you terminate the statement with a semicolon.

To execute host operating system commands from the ISQL prompt, type HOST followed by the operating system command. After completion of the HOST statement, the ISQL> prompt returns. To execute SQL scripts from ISQL, type @ followed by the name of the file containing SQL statements.

To exit from interactive SQL, type EXIT or QUIT.

You can supply optional switches and arguments to the isql command.

Syntax

isql [-s script_file] [-u user_name] [-a password] [connect_string]

Arguments

-s script_file

The name of an SQL script file that c-treeSQL executes when it invokes ISQL.

Note: For Windows platforms, if the file name has a space, such as: test script.sql

FairCom Corporation

3-1

Page 27
Image 27
HP c-tree-SQL ISQL and Tools manual Isql Statements, Starting Interactive SQL, Syntax, Arguments, Scriptfile