Manufacturing Engineering Modular Series: Manufacturing Information and Data Systems

Appendix 1: Basic SQL Commands

Overview

CREATE TABLE statement

Creates a new table.

<b class="bold">        CREATE TABLE</b> table (field1 type [(size)] [<b class="bold">NOT NULL</b>]        [index 1] [, field2 type [(size)] [<b class="bold">NOT NULL</b>] [index2] [, ...]] [,        <b class="bold">CONSTRAINT</b> multifieldindex [,...]])

Part

Description

table

The name of the table to be created.

field1, field2

The name of field or fields to be created in the new table. You must create at least one field.

type

The data type of field in the new table (see data type section at the end of this document).

size

The field size in characters (text and binary fields only).

index 1, index2

A CONSTRAINT clause defining a single-field index.

multifieldindex

A CONSTRAINT clause defining a multiple-field index.

INSERT INTO statement

Adds a record or multiple records to a table. This is referred to as an append query.

Multiple-record append query:

<b class="bold">        INSERT INTO</b> target [<b class="bold">IN</b> externaldatabase] [(field1[,field2[,...]])]        <b class="bold">SELECT</b> [source.]field1[, field2[,...]]        <b class="bold">FROM</b> tableexpression

Single-record append query:

<b class="bold">        INSERT INTO</b> target [(field1[, field2[,...]])]        <b class="bold">VALUES</b> (value1[, value2[,...]])

Part

Description

target

The name of the table or query to append records to.

externaldatabase

The path to...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Vacuum Ovens
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.