138 lines
7.5 KiB
HTML
138 lines
7.5 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="Employee table (EMPLOYEE)" />
|
|
<meta name="abstract" content="The employee table identifies all employees by an employee number and lists basic personnel information." />
|
|
<meta name="description" content="The employee table identifies all employees by an employee number and lists basic personnel information." />
|
|
<meta name="DC.subject" content="examples, table, EMPLOYEE, used in examples, EMPLOYEE, sample tables, UDB for, DB2, iSeries" />
|
|
<meta name="keywords" content="examples, table, EMPLOYEE, used in examples, EMPLOYEE, sample tables, UDB for, DB2, iSeries" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafysamptblx.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyxmpemp.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="rbafyemployee" />
|
|
<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>Employee table (EMPLOYEE)</title>
|
|
</head>
|
|
<body id="rbafyemployee"><a name="rbafyemployee"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Employee table (EMPLOYEE)</h1>
|
|
<div><p>The employee table identifies all employees by an employee number
|
|
and lists basic personnel information.</p>
|
|
<div class="section"><p>The employee table is created with the following CREATE TABLE
|
|
and ALTER TABLE statements: </p>
|
|
<pre><strong>CREATE TABLE</strong> EMPLOYEE
|
|
(EMPNO <strong>CHAR</strong>(6) <strong>NOT NULL</strong>,
|
|
FIRSTNME <strong>VARCHAR</strong>(12) <strong>NOT NULL</strong>,
|
|
MIDINIT <strong>CHAR</strong>(1) <strong>NOT NULL</strong>,
|
|
LASTNAME <strong>VARCHAR</strong>(15) <strong>NOT NULL</strong>,
|
|
WORKDEPT <strong>CHAR</strong>(3) ,
|
|
PHONENO <strong>CHAR</strong>(4) ,
|
|
HIREDATE <strong>DATE</strong> ,
|
|
JOB <strong>CHAR</strong>(8) ,
|
|
EDLEVEL <strong>SMALLINT</strong> <strong>NOT NULL</strong>,
|
|
SEX <strong>CHAR</strong>(1) ,
|
|
BIRTHDATE <strong>DATE</strong> ,
|
|
SALARY <strong>DECIMAL</strong>(9,2) ,
|
|
BONUS <strong>DECIMAL</strong>(9,2) ,
|
|
COMM <strong>DECIMAL</strong>(9,2)
|
|
<strong>PRIMARY KEY</strong> (EMPNO))
|
|
|
|
<strong>ALTER TABLE</strong> EMPLOYEE
|
|
<strong>ADD FOREIGN KEY</strong> RED (WORKDEPT)
|
|
<strong>REFERENCES</strong> DEPARTMENT
|
|
<strong>ON DELETE SET NULL</strong>
|
|
|
|
<strong>ALTER TABLE</strong> EMPLOYEE
|
|
<strong>ADD CONSTRAINT</strong> NUMBER
|
|
<strong>CHECK</strong> (PHONENO >= '0000' <strong>AND</strong> PHONENO <= '9999')</pre>
|
|
</div>
|
|
<div class="section"><p>The following indexes are created: </p>
|
|
<pre><strong>CREATE UNIQUE INDEX</strong> XEMP1
|
|
<strong>ON</strong> EMPLOYEE (EMPNO)
|
|
|
|
<strong>CREATE INDEX</strong> XEMP2
|
|
<strong>ON</strong> EMPLOYEE (WORKDEPT)</pre>
|
|
</div>
|
|
<div class="section"><p>The following alias is created for the table: </p>
|
|
<pre><strong>CREATE ALIAS</strong> EMP <strong>FOR</strong> EMPLOYEE</pre>
|
|
</div>
|
|
<div class="section"><p>The table below shows the content of the columns.</p>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="void" border="1" rules="rows"><thead align="left"><tr><th align="left" valign="bottom" width="25%" id="d0e161">Column name</th>
|
|
<th align="left" valign="bottom" width="75%" id="d0e163">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td align="left" valign="top" width="25%" headers="d0e161 ">EMPNO</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Employee number</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">FIRSTNME</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">First name of employee</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">MIDINIT</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Middle initial of employee</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">LASTNAME</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Family name of employee</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">WORKDEPT</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">ID of department in which the employee works</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">PHONENO</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Employee telephone number</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">HIREDATE</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Date of hire</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">JOB</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Job held by the employee</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">EDLEVEL</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Number of years of formal education</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">SEX</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Sex of the employee (M or F)</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">BIRTHDATE</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Date of birth</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">SALARY</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Yearly salary in dollars</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">BONUS</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Yearly bonus in dollars</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="25%" headers="d0e161 ">COMM</td>
|
|
<td align="left" valign="top" width="75%" headers="d0e163 ">Yearly commission in dollars</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="rbafyxmpemp.htm">EMPLOYEE</a></strong><br />
|
|
A complete listing of the data in table EMPLOYEE.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafysamptblx.htm" title="This topic contains the sample tables referred to and used in this topic and the SQL Reference topic collection.">DB2 UDB for iSeries sample tables</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |