diff --git a/sources/dv_foxhelp/html/00312970-64d1-4f0f-a539-9687382bdcd9.htm b/sources/dv_foxhelp/html/00312970-64d1-4f0f-a539-9687382bdcd9.htm index e3ab643..55328bc 100644 --- a/sources/dv_foxhelp/html/00312970-64d1-4f0f-a539-9687382bdcd9.htm +++ b/sources/dv_foxhelp/html/00312970-64d1-4f0f-a539-9687382bdcd9.htm @@ -1,4 +1,4 @@ - +
@@ -74,7 +74,7 @@mydbc1 and mydbc2, and a table named table1. The table is added to mydbc1 when it is created. The table is then closed and removed from mydbc1. ADD TABLE is then used to add the table to mydbc2. RENAME TABLE is used to change the name of the table from table1 to table2.
- Copy Code | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CREATE DATABASE mydbc1 +
|
||||||||||||||||
ALTER TABLE TableName1 [DROP [COLUMN] FieldName3] - [SET CHECK lExpression3 [ERRORcMessageText3]] [DROP CHECK] + [SET CHECK lExpression3 [ERROR cMessageText3]] + [DROP CHECK] [ADD PRIMARY KEY eExpression3 [FOR lExpression4] TAG TagName2 - [COLLATE cCollateSequence]] [DROP PRIMARY KEY] + [COLLATE cCollateSequence]] + [DROP PRIMARY KEY] [ADD UNIQUE eExpression4 [[FOR lExpression5] TAG TagName3 - [COLLATE cCollateSequence]]] [DROP UNIQUE TAG TagName4] - [ADD FOREIGN KEY [eExpression5] [FOR lExpression6] TAG TagName4 - REFERENCES TableName4 [TAG TagName4][COLLATE cCollateSequence] - REFERENCES TableName2 [TAG TagName5]] + [COLLATE cCollateSequence]]] + [DROP UNIQUE TAG TagName4] + [ADD FOREIGN KEY [eExpression5] [FOR lExpression6] TAG TagName4 + [COLLATE cCollateSequence] + REFERENCES TableName2 [TAG TagName5]] [DROP FOREIGN KEY TAG TagName6 [SAVE]] - [RENAME COLUMN FieldName4 TO FieldName5] [NOVALIDATE] |
Modifies the structure of a table. The TableName1 parameter specifies the name of the table to be modified.
@@ -177,7 +181,7 @@N
–
+–
@@ -188,10 +192,10 @@
Y, Currency
–
+–
–
+–
@@ -203,10 +207,10 @@
D, Date
–
+–
–
+–
@@ -218,10 +222,10 @@
T, DateTime
–
+–
–
+–
@@ -233,7 +237,7 @@
B, Double
–
+–
D
@@ -248,10 +252,10 @@G, General
–
+–
–
+–
@@ -263,10 +267,10 @@
I, Int, Interger
–
+–
–
+–
@@ -278,10 +282,10 @@
L, Logical
–
+–
–
+–
@@ -293,10 +297,10 @@
M, Memo
–
+–
–
+–
@@ -414,28 +418,30 @@
Specifies an error message for the table validation rule in lExpression3. Visual FoxPro displays this message when the table validation rule generates an error. The message displays only when data is changed within a Browse window or Edit window.
Removes the table validation rule.
-Adds a primary index to the table. The eExpression3 specifies the primary index key expression.
You can use lExpression4 to specify a filter expression where only records that satisfy the condition are available for display and access. Primary index keys are created in the index file just for those records that match the filter expression. You should avoid using the FOR clause to create a primary index; the uniqueness of a primary key is enforced only for those records that match the condition specified in the FOR clause. Instead, use the INDEX command with a FOR clause to create a filtered index.
-Rushmore Query Optimization optimizes an ALTER TABLE ... FOR lExpression4 command if the lExpression4 expression can be optimized. For the best performance, use an optimizable expression in the FOR clause. For more information, see SET OPTIMIZE Command and Using Rushmore Query Optimization to Speed Data Access.
-The TagName2 parameter specifies the name of the primary index tag. Index tag names can contain up to 10 characters. If you omit TAG TagName2, and eExpression3 is a single field, the primary index tag has the same name as the field specified in eExpression3.
+Rushmore Query Optimization optimizes an ALTER TABLE?...?FOR?lExpression4 command if the lExpression4 expression can be optimized. For the best performance, use an optimizable expression in the FOR clause. For more information, see SET OPTIMIZE Command and Using Rushmore Query Optimization to Speed Data Access.
+The TagName2 parameter specifies the name of the primary index tag. Index tag names can contain up to 10 characters. If you omit TAG?TagName2, and eExpression3 is a single field, the primary index tag has the same name as the field specified in eExpression3.
Removes the primary index and its index tag. A table can have only one primary key, so you do not need to specify the name of the primary key. Removing the primary index also deletes any persistent relations based on the primary key.
-Adds a candidate index to the table. The eExpression4 parameter specifies the candidate index key expression. The TagName3 parameter specifies the name of the candidate index tag. Index tag names can contain up to 10 characters. If you omit TAG TagName3, and if eExpression4 is a single field, the candidate index tag has the same name as the field specified in eExpression4.
You can use the lExpression5 parameter to specify a filter expression where only records that satisfy the condition are available for display and access. Candidate index keys are created in the index file just for those records that match the filter expression.
-Rushmore optimizes an ALTER TABLE ... FOR lExpression5 command if the lExpression5 expression can be optimized. For the best performance, use an optimizable expression in the FOR clause. For more information, see SET OPTIMIZE Command and Using Rushmore Query Optimization to Speed Data Access.
+Rushmore optimizes an ALTER TABLE?...?FOR ?lExpression5 command if the lExpression5 expression can be optimized. For the best performance, use an optimizable expression in the FOR clause. For more information, see SET OPTIMIZE Command and Using Rushmore Query Optimization to Speed Data Access.
Removes the candidate index and its index tag. A table can have multiple candidate keys, so you must specify the name of the candidate index tag.
-Adds a foreign (non-primary) index to the table. The eExpression5 parameter specifies the foreign index key expression. The TagName4 parameter specifies the name of the foreign index tag. Index tag names can contain up to 10 characters.
You can use the lExpression6 parameter to specify a filter expression where only records that satisfy the condition are available for display and access. Foreign index keys are created in the index file just for those records that match the filter expression.
-Rushmore optimizes an ALTER TABLE ... FOR lExpression6 command if the lExpression6 expression can be optimized. For the best performance, use an optimizable expression in the FOR clause. For more information, see SET OPTIMIZE Command and Using Rushmore Query Optimization to Speed Data Access.
-Rushmore optimizes an ALTER TABLE ... FOR lExpression6 command if the lExpression6 expression can be optimized. For the best performance, use an optimizable expression in the FOR clause. For more information, see SET OPTIMIZE Command and Using Rushmore Query Optimization to Speed Data Access.
+Specifies the parent table to which a persistent relationship is established. You can use the TAG TagName5 clause to establish a relationship based on an existing index tag for the parent table. Index tag names can contain up to 10 characters. If you omit the TAG clause, Visual FoxPro establishes the relationship using the parent table's primary index tag.
-TagName5 must be a primary or candidate key of TableName2
+Deletes a foreign key whose index tag is TagName6. You can use SAVE to keep the index tag in the structural index. If you omit SAVE, the index tag is deleted from the structural index.
-Makes it possible for you to change the name of a field in the table. The FieldName4 parameter specifies the name of the field to be renamed. The FieldName5 paramter specifies the new name of the field.
Caution | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Exercise care when renaming table fields because index expressions, field and table validation rules, commands, functions, and so on might refer to the original field names. @@ -459,7 +465,7 @@
Note
- | Candidate indexes, created by including the UNIQUE option (provided for ANSI compatibility) in CREATE TABLE – SQL or ALTER TABLE – SQL commands, are not the same as indexes created in the INDEX command with the UNIQUE option. An index created in the INDEX command using the UNIQUE option allows duplicate index keys; candidate indexes do not allow duplicate index keys. For more information about the UNIQUE option in the INDEX command, see INDEX Command. The term CANDIDATE is a synonym of UNIQUE and can be used instead if you choose. +Candidate indexes, created by including the UNIQUE option (provided for ANSI compatibility) in CREATE TABLE ? SQL or ALTER TABLE ? SQL commands, are not the same as indexes created in the INDEX command with the UNIQUE option. An index created in the INDEX command using the UNIQUE option allows duplicate index keys; candidate indexes do not allow duplicate index keys. For more information about the UNIQUE option in the INDEX command, see INDEX Command. The term CANDIDATE is a synonym of UNIQUE and can be used instead if you choose.
If you do not want to return the value, use the RETURN command without the DODEFAULT() function. To determine if keys were specified when items were added to the collection, you can use the statement
To derive the index or key from an item in a collection from within a FOR EACH loop, use a normal FOR loop instead of a FOR EACH loop.
| Copy CodeCLEAR +
See Also |
- |||||||||||||||||||||||||||||||||||||||||||||||
Copy Code | |
|---|---|
clear
+Mkdir C:\MyDir1
+Mkdir C:\MyDir2
+
+Set Path To C:\MyDir1
+Cd C:\MyDir2
+
+Strtofile('','C:\MyDir1\Text1.txt')
+
+Strtofile('','C:\MyDir2\A.txt')
+Strtofile('','C:\MyDir2\Text2.txt')
+
+*file does exist:
+?Sys(2014,'Text2.txt','C:\MyDir2\A.txt') && Output: TEXT2.TXT
+*file does not exist:
+?Sys(2014,'Text3.txt','C:\MyDir2\A.txt') && Output: TEXT3.TXT
+*will find Text1.txt along the path
+?Sys(2014,'Text1.txt','C:\MyDir2\A.txt') && Output: ..\MYDIR1\X\TEXT1.TXT | |
See Also- SET STEP -
--
The following table lists commands that are ignored when used in a distributed application.
|
+ + SET STEP + + |
+
+ + |
Visual FoxPro installs files on your computer that are restricted and cannot be reproduced or distributed, including:
@@ -262,8 +262,6 @@Pursuant to the Microsoft License Agreement you received with this product, you must distribute files in conjunction with a corresponding application. The following guidelines apply to distributable files.
@@ -293,7 +291,7 @@
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08
See Also
See Also
See Also