12.07.2015 Views

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<str<strong>on</strong>g>Soluti<strong>on</strong></str<strong>on</strong>g> <str<strong>on</strong>g>Guide</str<strong>on</strong>g> <str<strong>on</strong>g>for</str<strong>on</strong>g> <str<strong>on</strong>g>Migrating</str<strong>on</strong>g> <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> <strong>on</strong> <strong>UNIX</strong> <strong>to</strong> <strong>SQL</strong> <strong>Server</strong> <strong>on</strong> Windows 107Table 6.6: <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> and <strong>SQL</strong> <strong>Server</strong> Table Types Compared<str<strong>on</strong>g>Oracle</str<strong>on</strong>g>Heap-Organized TableClustered Table -Partiti<strong>on</strong>ed Table -Nested Table -Temporary TableExternal Table -Object Table -Index-Organized Table<strong>SQL</strong> <strong>Server</strong>HeapTemporary TableClustered IndexThe most comm<strong>on</strong> implementati<strong>on</strong> of the table object is, in its basic <str<strong>on</strong>g>for</str<strong>on</strong>g>m, the heap-is the focus of the remainder of this organized table, and this table object secti<strong>on</strong>.The CREATE TABLE syntax, which creates a simple heap organized table, has threemajor parts:● Table name● Body (enclosed in parenthesis) — column name, column properties (data type,defaults, inline column c<strong>on</strong>straints), out-of-line column c<strong>on</strong>straints, tablec<strong>on</strong>straints● S<strong>to</strong>rage specificati<strong>on</strong>Table 6.7 compares the structural compositi<strong>on</strong> of the CREATE TABLE syntax in <str<strong>on</strong>g>Oracle</str<strong>on</strong>g>and <strong>SQL</strong> <strong>Server</strong>.Table 6.7: High-level Comparis<strong>on</strong> of Table Definiti<strong>on</strong> Syntax<str<strong>on</strong>g>Oracle</str<strong>on</strong>g><strong>SQL</strong> <strong>Server</strong>CREATE TABLECREATE TABLE[schema.]table_name[[database.]owner.]table_name(column namecolumn data type(column namecolumn data typedefault expressi<strong>on</strong>column c<strong>on</strong>straint, …defaults expressi<strong>on</strong>column c<strong>on</strong>straint, …out of line or table c<strong>on</strong>strain<strong>to</strong>ut of line or table c<strong>on</strong>straint) )[s<strong>to</strong>rage_specificati<strong>on</strong>][s<strong>to</strong>rage_specificati<strong>on</strong>]The steps <str<strong>on</strong>g>for</str<strong>on</strong>g> creating a table in <strong>SQL</strong> <strong>Server</strong> using both Enterprise Manager and T-<strong>SQL</strong>are provided in the following procedures. To create a new table using Enterprise Manager, follow these steps:1. Expand <strong>Server</strong>, then Databases, and then the target database.2. Right-click Tables and select New Table. A new window appears <str<strong>on</strong>g>for</str<strong>on</strong>g> addingcolumns and other objects, such as indexes and c<strong>on</strong>straints related <strong>to</strong> the table.This window is called the Table Designer <strong>to</strong>ol.3. Add new columns in the <strong>to</strong>p grid (column definiti<strong>on</strong> grid) al<strong>on</strong>g with the column datatype and nullability c<strong>on</strong>straint. Some of the column's properties, such as Default

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!