Product Documentation

FairCom ISQL

Previous Topic

Next Topic

@ (Execute)

Syntax

@filename

Description

Executes the SQL statements stored in the specified SQL script file. The statements specified in the file are not added to the history buffer.

Arguments

filename

The name of the script file.

Notes

The GET, START, and @ (execute) statements are similar in that they all read SQL script files. Both GET and START read an SQL script file and append the first statement in it to the history buffer. However, the START statement also executes the script statement and accepts arguments that it substitutes for parameter references in the script statement. The @ (execute) statement, on the other hand, executes all the statements in an SQL script file but does not add any of the statements to the history buffer. The @ statement does not support argument substitution.

Example

The following example shows a simple ISQL script file.

Example ISQL script


connect to demodb;

set echo on ;

create table stores (item_no integer, item_name char(20));

insert into stores values (1001,chassis);

insert into stores values (1002,chips);

select * from stores where item_no > 1001;

set echo off ;


To execute the above statements stored in the file cmdfile, enter:

ISQL> @cmdfile

TOCIndex