![]() |
Datenbank: Oracle
Tabelle in einer DB ändern
Hallo,
ich habe da mal ein kleines Problemchen. Ich habe eine Tabelle in einer DB. Dort habe ich ein feld, wo ich ein not null constraint anlegen möchte. meine lösung funzt leider net. könnt ihr mir helfen?
SQL-Code:
Das funzt leider net. Habt ihr ne Idee?
ALTER TABLE Pat
ADD CONSTRAINT cpatid NOT NULL(PatID); MFG Chris [edit=mkinzler]Verwendetes DBMS ergänzt Mfg, mkinzler[/edit] |
Re: Tabelle in einer DB ändern
Zitat:
[Edit] DML -> DDL geändert [/Edit] |
DP-Maintenance
Dieses Thema wurde von "mkinzler" von "Klatsch und Tratsch" nach "Datenbanken" verschoben.
Ist eine Datenbankfrage |
Re: Tabelle in einer DB ändern
Bitte ergänze die verwendete Datenbank unf beschreibe dein Problem näher
|
Re: Tabelle in einer DB ändern
Hallo,
es kommt ne meldung von sqlplus. ADD CONSTRAINT cpatid NOT NULL(PatID) ERROR at line 2: ORA-00904: invalid identifier ich nutze eine oracle DB |
Re: Tabelle in einer DB ändern
Und so?
SQL-Code:
[edit] Hier nachgeschaut:
ALTER TABLE Pat
ADD CONSTRAINT cpatid CHECK (PatID IS NOT NULL); ![]() |
Re: Tabelle in einer DB ändern
ok, super so funzt es.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:42 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz