Autor Beitrag
csigg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mo 13.06.05 12:01 
Kann ich bei IB6 nachträglich eine Spalte zur Foreign/Primaryke machen??
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Mo 13.06.05 13:27 
Japp, für Primary Keys:
ausblenden Quelltext
1:
2:
ALTER TABLE tabelle 
ADD CONSTRAINT pk_feldname PRIMARY KEY (feldname)

wobei pk_feldname beliebig gewählt werden kann, das ist der Name des COnstraints
oder für Foreign Keys:
ausblenden Quelltext
1:
2:
ALTER TABLE tabelle 
ADD CONSTRAINT fk_feldname FOREIGN KEY (feldname) REFERENCES tabelle2(feldname)
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Mo 13.06.05 13:39 
ok, vielen Dank.