Article ID: 130410
Article Last Modified on 5/7/2003
CLOSE ALL
CLEAR
CREATE DATABASE mydata && Creates MYDATA.DBC.
USE samples\data\orders
COPY NEXT 10 TO orders2 && Copies the first 10 records from
&& ORDERS.DBF to a new table ORDERS2.DBF.
USE && Clears ORDERS.DBF from memory.
ADD TABLE orders2 && Adds orders2 to MYDATA.DBC.
USE orders2
DISPLAY STRUCTURE && Very Important to note that the field
&& order_id has the character data type.
CLEAR
*
* The next command is used to create a Primary index tag on the
* field order_id, the syntax should be:
*
* ALTER TABLE orders2 ALTER COLUMN order_id C(6) PRIMARY KEY
* -or-
* ALTER TABLE orders2 ADD PRIMARY KEY order_id TAG order_id
*
ALTER TABLE orders2 ALTER order_id PRIMARY
DISPLAY STRUCTURE && Note the data type of order_id is now
&& Picture.
Additional query words: kbvfp300 kbvfp500 kbvfp600
Keywords: kbbug KB130410