Autor Beitrag
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Fr 14.02.03 11:33 
Ich habe mir mal die SQL-Scripts näher angesehen. Dabei bin ich auf folgendes gestoßen :

ausblenden Quelltext
1:
2:
ALTER TABLE RAB ADD CONSTRAINT PK_RAB PRIMARY KEY (ID);
ALTER TABLE REC ADD PRIMARY KEY (ID);


Wieso steht da bei dem ersten CONSTRAINT dabei und bei dem anderen nicht ? Bzw. wo kommt das her und was macht das :?: Vom Prinzip her müßte das bei beiden Tabellen gleich aussehen.

_________________
Gruß
Hansa
Lemmy
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 792
Erhaltene Danke: 49

Windows 7 / 10; CentOS 7; LinuxMint
Delphi 7-XE10.1, VS 2015
BeitragVerfasst: Fr 14.02.03 13:07 
Hi Hansa,

ist schnell erklärt: Schau mal ob Du in deinem IB-Tool die Indizes (Indexe oder sonst wie die Mehrzahl von Index) anzeigen lassen kannst:

Der erste PK wird als PK_RAB angezeigt, der zweite als rdb$Primary12. Mit einem Constraint kannst DU den ForeignKey und PrimaryKey Namen geben, was bei Fehlersuche,... wesentlich besser ist....

Grüße
Lemmy
hansa Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Fr 14.02.03 13:42 
ja, so ungefähr siehts aus: PK_RAB ist da, bei dem anderen steht INTEG_67. Bei den meisten Tables steht was mit constraint dabei, aber nicht bei allen ! Wie hab ich das denn bloß hingekriegt :?: Das fiel mir ja gerade erst auf. :shock:

_________________
Gruß
Hansa
hansa Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Mo 25.08.03 09:56 
Ich muß das Thema nochmals aktivieren. Wieso steht da manchmal constraint und manchmal nicht ? Die Frage ist immer noch offen.

_________________
Gruß
Hansa