137 lines
7.2 KiB
HTML
137 lines
7.2 KiB
HTML
<?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="reference" />
|
|
<meta name="DC.Title" content="Prompting" />
|
|
<meta name="abstract" content="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." />
|
|
<meta name="description" content="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." />
|
|
<meta name="DC.subject" content="interactive SQL, prompting" />
|
|
<meta name="keywords" content="interactive SQL, prompting" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyintract.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyprompt1.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyprompt2.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyprompt3.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyprompt4.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyprompt5.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="rbafyprompting" />
|
|
<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>Prompting</title>
|
|
</head>
|
|
<body id="rbafyprompting"><a name="rbafyprompting"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Prompting</h1>
|
|
<div><p>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.</p>
|
|
<div class="section"><p>You have two options when using the prompter: </p>
|
|
<ul><li>Type the verb of the statement before pressing F4=Prompt. <p>The statement
|
|
is parsed and the clauses that are completed are filled in on the prompt displays.</p>
|
|
<p>If
|
|
you type SELECT and press F4=Prompt, the following display appears: </p>
|
|
<div class="p"> <pre class="screen"> Specify SELECT Statement
|
|
|
|
Type SELECT statement information. Press F4 for a list.
|
|
|
|
FROM tables . . . . . . . . _____________________________________________
|
|
SELECT columns . . . . . . _____________________________________________
|
|
WHERE conditions . . . . . _____________________________________________
|
|
GROUP BY columns . . . . . _____________________________________________
|
|
HAVING conditions . . . . . _____________________________________________
|
|
ORDER BY columns . . . . . _____________________________________________
|
|
FOR UPDATE OF columns . . . _____________________________________________
|
|
|
|
Bottom
|
|
Type choices, press Enter.
|
|
|
|
DISTINCT rows in result table . . . . . . . . . N Y=Yes, N=No
|
|
UNION with another SELECT . . . . . . . . . . . N Y=Yes, N=No
|
|
Specify additional options . . . . . . . . . . . N Y=Yes, N=No
|
|
|
|
|
|
|
|
F3=Exit F4=Prompt F5=Refresh F6=Insert line F9=Specify subquery
|
|
F10=Copy line F12=Cancel F14=Delete line F15=Split line F24=More keys
|
|
</pre>
|
|
</div>
|
|
</li>
|
|
<li>Press F4=Prompt before typing anything on the Enter SQL Statements display.
|
|
You are shown a list of statements. The list of statements varies and depends
|
|
on the current interactive SQL statement processing mode. For syntax check
|
|
mode with a language other than *NONE, the list includes all SQL statements.
|
|
For run and validate modes, only statements that can be run in interactive
|
|
SQL are shown. You can select the number of the statement you want to use.
|
|
The system prompts you for the statement you selected. <p>If you press F4=Prompt
|
|
without typing anything, the following display appears: </p>
|
|
<div class="p"> <pre class="screen"> Select SQL Statement
|
|
|
|
Select one of the following:
|
|
|
|
1. ALTER TABLE
|
|
2. CALL
|
|
3. COMMENT ON
|
|
4. COMMIT
|
|
5. CONNECT
|
|
6. CREATE ALIAS
|
|
7. CREATE COLLECTION
|
|
8. CREATE INDEX
|
|
9. CREATE PROCEDURE
|
|
10. CREATE TABLE
|
|
11. CREATE VIEW
|
|
12. DELETE
|
|
13. DISCONNECT
|
|
14. DROP ALIAS
|
|
More...
|
|
Selection
|
|
__
|
|
|
|
F3=Exit F12=Cancel
|
|
</pre>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="section"><p>If you press F21=Display Statement on a prompt display, the prompter
|
|
displays the formatted SQL statement as it was filled in to that point.</p>
|
|
</div>
|
|
<div class="section"><p>When Enter is pressed within prompting, the statement that was
|
|
built through the prompt screens is inserted into the session. If the statement
|
|
processing mode is *RUN, the statement is run. The prompter remains in control
|
|
if an error is encountered.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="rbafyprompt1.htm">Syntax checking</a></strong><br />
|
|
The syntax of the SQL statement is checked when it enters the prompter.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafyprompt2.htm">Statement processing mode</a></strong><br />
|
|
The statement processing mode can be selected on the Change Session Attributes display.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafyprompt3.htm">Subqueries</a></strong><br />
|
|
Subqueries can be selected on any display that has a WHERE or HAVING clause.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafyprompt4.htm">CREATE TABLE prompting</a></strong><br />
|
|
When prompting for CREATE TABLE, support is available for entering column definitions individually.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafyprompt5.htm">Enter DBCS data</a></strong><br />
|
|
The rules for processing DBCS data across multiple lines are the same on the Enter SQL Statements display and in the SQL prompter.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafyintract.htm" title="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.">Use interactive SQL</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |