Re: Altering Table - Adding Primary Key With References

From: Sietse Wijnker (sietse.wijnker_at_ATsw-software.nl)
Date: 09/02/04


Date: Thu, 2 Sep 2004 19:00:08 +0200

Hi Mikhail,

I think you're expecting too much functionality from the command

ADD PRIMARY KEY eExpression3 [FOR lExpression4] TAG TagName2
This clause in the alter table command gives you the possibility to add a
primary key _INDEX_(!)

PRIMARY KEY in the CREATE TABLE command also sets the field as a primairy
index.

Relations between tables can be defined in the database but they are not
defaulted when you open the tables using the USE command. The relations
defined in the database are used for default relations when adding the
tables to the dataenvironment of te form or report designer.
The relations are also used by the referential integrety.

HTH,
Sietse Wijnker



Relevant Pages

  • Re: Altering Table - Adding Primary Key With References
    ... The CREATE TABLE command work fine. ... > let the primary key of the Child table be the referecing field. ... > can't do it with the ALTER TABLE command in VFP8. ... > ALTER TABLE Morechildren ADD FOREIGN KEY cid TAG cid1 REFERENCES Parents ...
    (microsoft.public.fox.vfp.dbc)
  • Setting column Width of new column
    ... I have an application that needs to add a column to one of its database ... I am doing this with the "ALTER TABLE" command and setting the new ... entry is not space-filled to the maximum column size? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Altering Table - Adding Primary Key With References
    ... the same goes for the ALTER TABLE command ... ALTER TABLE TableName1 ... REFERENCES TableName2 [TAG TagName5]] ... PRIMARY KEY tpr_ipk_longerthan10 TAG tpr_ipk) ...
    (microsoft.public.fox.vfp.dbc)
  • Re: Pagesize question
    ... Here you've changed the page size of your system catalog, but not of the test_ingres_ruby_driver database or of the default value for the installation. ... CREATE TABLE posts (id TABLE_KEY NOT NULL with system_maintained, ... 'Alter Table ADD/DROP column support for pages greater than 2k only. ... command only logically changes the table definition; it doesn't change the underlying table. ...
    (comp.databases.ingres)
  • Re: Merge is adding 2 records to the dataset
    ... Also my insert command also has a select statement which uses the @@Identity ... this is how Merge works - it looks at primary key to find out whether ... > Before doing update I link same rows from original and getchanges dataset ... >> The database has only 1 record added though.. ...
    (microsoft.public.dotnet.framework.adonet)