home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
sql
/
insert.shr
< prev
next >
Wrap
Text File
|
1988-03-06
|
2KB
|
76 lines
INSERT
The insert command is used to put data into your database.
SYNTAX:
insert filename;
EXAMPLE:
insert cust;
After the command is entered, you are prompted for each column
in a row of data. The following would appear after typing "insert
cust".
insert cust;
ESC = EXIT, <ENTER> = NULL VALUE
code : c1
name : Compugorp______
st : WA
rating : 20
----
code : __ <-- ESC pressed
1 rows inserted
MAKING CORRECTIONS
Within each prompt for a column, the maximum number of
characters or digits is represented by underlines. The only key
you can use for making corrections to a line you are on is by
using the backspace key.
If you made a mistake on a previous column in the row you are
on, or you want to cancel the current row, press the ESC key and
you will exit from the insert command. The current row is not
added to the table.
THE NULL ENTRY
For the null entry, press the ENTER key at the first position of
the prompt.
In some cases, you want to make the database realize that data
is not appropriate for a certain column in a certain row. It is
different from a zero. For example, in the manufacturing
table, we have a column for the percent of defects. For some of
the items, defects are not tracked. This is not to say that
there are zero defects - we just don't have the data.
The where clause in the select command has special ways of
handling the null. You can select rows that just have nulls in
a column or rows that do not have nulls in a column. Any
numeric operation (such as avg or min) skips a row where the
numeric column is null.
TO EXIT THE INSERT MODE
Press the ESC at the prompt for the first column in the row.
INSERT-1