63 lines
3.6 KiB
HTML
63 lines
3.6 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="copyright" content="(C) Copyright IBM Corporation 2005" />
|
||
|
<meta name="DC.rights.owner" content="(C) Copyright IBM Corporation 2005" />
|
||
|
<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="task" />
|
||
|
<meta name="DC.Title" content="Create a schema" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzatcgetstartsql.htm" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rzatcschema" />
|
||
|
<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>Create a schema</title>
|
||
|
</head>
|
||
|
<body id="rzatcschema"><a name="rzatcschema"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Create a schema</h1>
|
||
|
<div><div class="section">A schema is the basic object in which tables, views, indexes, and
|
||
|
packages are placed. For more information about creating a schema, see <a href="../db2/rbafzmstxcschema.htm">SQL CREATE SCHEMA statement</a> in
|
||
|
the SQL Reference topic.<div class="note"><span class="notetitle">Note:</span> The term <em>collection</em> can be used synonymously
|
||
|
with schema.</div>
|
||
|
<p>To create a sample schema named SAMPLECOLL, follow these
|
||
|
steps:</p>
|
||
|
</div>
|
||
|
<ol><li class="stepexpand"><span>Enter the following SQL statement on the Enter SQL Statements panel:</span> <pre class="screen"> Enter SQL Statements
|
||
|
|
||
|
Type SQL statement, press Enter.
|
||
|
Current connection is to relational database SYSTEM1
|
||
|
===> <strong>CREATE SCHEMA SAMPLECOLL</strong>_____________________________________________
|
||
|
_____________________________________________________________________
|
||
|
_____________________________________________________________________
|
||
|
_____________________________________________________________________
|
||
|
Bottom
|
||
|
F3=Exit F4=Prompt F6=Insert line F9=Retrieve F10=Copy line
|
||
|
F12=Cancel F13=Services F24=More keys</pre>
|
||
|
</li>
|
||
|
<li class="stepexpand"><span>Press Enter.</span></li>
|
||
|
</ol>
|
||
|
<div class="section"><div class="note"><span class="notetitle">Note:</span> Running this statement causes several objects to be created
|
||
|
and takes several seconds.</div>
|
||
|
<p>After you have successfully created a
|
||
|
schema, you can create tables, views, and indexes in it. Tables, views, and
|
||
|
indexes can also be created in libraries instead of schemas.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzatcgetstartsql.htm" title="This topic describes how to create and work with schemas, tables, and views using SQL statements in interactive SQL.">Get started with SQL</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|