ibm-information-center/dist/eclipse/plugins/i5OS.ic.sqlp_5.4.0.1/rbafyintract.htm

123 lines
9.2 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Use interactive SQL" />
<meta name="abstract" content="Interactive SQL allows the programmer or database administrator to quickly and easily define, update, delete, or look at data for testing, problem analysis, and database maintenance." />
<meta name="description" content="Interactive SQL allows the programmer or database administrator to quickly and easily define, update, delete, or look at data for testing, problem analysis, and database maintenance." />
<meta name="DC.subject" content="interactive SQL, function, overview, statements, testing, using interactive SQL, interactive SQL, statement entry, testing your SQL statements with, description, general use, prompting, session services" />
<meta name="keywords" content="interactive SQL, function, overview, statements, testing, using interactive SQL, interactive SQL, statement entry, testing your SQL statements with, description, general use, prompting, session services" />
<meta name="DC.Relation" scheme="URI" content="rbafydynamic.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafystrsql.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafystmtentry.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafyprompting.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafyuselistselect.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafysessionservices.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafyxintsql.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafyuseexistisql.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafyrecover.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafyaccrdi.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafydynmic.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafynonsil.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbafyintract" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Use interactive SQL</title>
</head>
<body id="rbafyintract"><a name="rbafyintract"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Use interactive SQL</h1>
<div><p>Interactive SQL allows the programmer or database administrator
to quickly and easily define, update, delete, or look at data for testing,
problem analysis, and database maintenance.</p>
<p>A programmer, using interactive SQL, can insert rows into a table and test
the SQL statements before running them in an application program. A database
administrator can use interactive SQL to grant or revoke privileges, create
or drop schemas, tables, or views, or select information from system catalog
tables.</p>
<p>After an interactive SQL statement is run, a completion message or an error
message is displayed. In addition, status messages are normally displayed
during long-running statements.</p>
<p>You can see help on a message by positioning the cursor on the message
and pressing F1=Help.</p>
<p>The basic functions supplied by interactive SQL are:</p>
<ul><li>The <strong>statement entry</strong> function allows you to: <ul><li>Type in an interactive SQL statement and run it.</li>
<li>Retrieve and edit statements.</li>
<li>Prompt for SQL statements.</li>
<li>Page through previous statements and messages.</li>
<li>Call session services.</li>
<li>Start the list selection function.</li>
<li>Exit interactive SQL.</li>
</ul>
</li>
<li>The <strong>prompt</strong> function allows you to type either a complete SQL statement
or a partial SQL statement, press F4=Prompt, and then be prompted for the
syntax of the statement. It also allows you to press F4 to get a menu of all
SQL statements. From this menu, you can select a statement and be prompted
for the syntax of the statement.</li>
<li>The <strong>list selection function</strong> allows you to select from lists of
your authorized relational databases, schemas, tables, views, columns, constraints,
or SQL packages. <p>The selections you make from the lists can be inserted
into the SQL statement at the cursor position.</p>
</li>
<li>The <strong>session services</strong> function allows you to: <ul><li>Change session attributes.</li>
<li>Print the current session.</li>
<li>Remove all entries from the current session.</li>
<li>Save the session in a source file.</li>
</ul>
</li>
</ul>
<div class="note"><span class="notetitle">Notes:</span> <ol><li>The term <em>collection</em> is used synonymously with <em>schema</em>.</li>
<li>By using the code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</li>
</ol>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbafystrsql.htm">Start interactive SQL</a></strong><br />
You can start using interactive SQL by typing <samp class="codeph">STRSQL</samp> on
an <span class="keyword">i5/OS™</span> command line.</li>
<li class="ulchildlink"><strong><a href="rbafystmtentry.htm">Use statement entry function</a></strong><br />
The statement entry function is the function you first enter when selecting interactive SQL. You return to the statement entry function after processing each interactive SQL statement.</li>
<li class="ulchildlink"><strong><a href="rbafyprompting.htm">Prompting</a></strong><br />
The prompt function helps you supply the necessary information for the syntax of the statement you want to use. The prompt function can be used in any of these statement processing modes: *RUN, *VLD, and *SYN.</li>
<li class="ulchildlink"><strong><a href="rbafyuselistselect.htm">Use the list selection function</a></strong><br />
The list selection function is available by pressing F4 on certain prompt displays, or F16, F17, or F18 on the Enter SQL Statements display.</li>
<li class="ulchildlink"><strong><a href="rbafysessionservices.htm">Session services description</a></strong><br />
The interactive SQL Session Services display is requested by pressing F13 on the Enter SQL Statements display.</li>
<li class="ulchildlink"><strong><a href="rbafyxintsql.htm">Exit interactive SQL</a></strong><br />
Pressing F3=Exit on the Enter SQL Statements display allows you to exit the interactive SQL environment. You have several options for exiting.</li>
<li class="ulchildlink"><strong><a href="rbafyuseexistisql.htm">Use an existing SQL session</a></strong><br />
If you saved only one interactive SQL session by using option 1 (Save and exit session) on the Exit Interactive SQL display, you may resume that session at any workstation.</li>
<li class="ulchildlink"><strong><a href="rbafyrecover.htm">Recover an SQL session</a></strong><br />
If the previous SQL session ended abnormally, interactive SQL presents the Recover SQL Session display at the start of the next session (when the next STRSQL command is entered).</li>
<li class="ulchildlink"><strong><a href="rbafyaccrdi.htm">Access remote databases with interactive SQL</a></strong><br />
In interactive SQL, you can communicate with a remote relational database by using the SQL CONNECT statement. Interactive SQL uses the CONNECT (Type 2) semantics (distributed unit of work) for CONNECT statements.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafydynamic.htm" title="You can use SQL in many different environments. Some of them are discussed here.">Use SQL in different environments</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rbafydynmic.htm" title="Dynamic SQL allows an application to define and run SQL statements at program run time. An application that provides for dynamic SQL accepts as input (or builds) an SQL statement in the form of a character string. The application does not need to know what type of SQL statement it will run.">Dynamic SQL applications</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="rbafynonsil.htm" title="To build a dynamic SQL non-SELECT statement, you need to verify that the SQL statement you want to build is one that can be run dynamically and then build the SQL statement.">Process non-SELECT statements</a></div>
</div>
</div>
</body>
</html>