-
Creating a Table Where Date has to be Now OR Future
How do i get a Table with the Collum Date That Looks if The Date that was put in is NOW or in the FUTURE
This is What i got Right now.
CREATE TABLE uitgifte
(uitgiftenr SERIAL PRIMARY KEY,
klantnr INT,
datum DATE >= NOW,
FOREIGN KEY (klantnr) REFERENCES klant (klantnr))
The Date Idk how to Make it Check automatically for Dates Beyond.
-
Originally Posted by Shadowayara
...
CREATE TABLE uitgifte
(uitgiftenr SERIAL PRIMARY KEY,
klantnr INT,
datum DATE,
CONSTRAINT gt_now CHECK (datum >= now())
FOREIGN KEY (klantnr) REFERENCES klant (klantnr))
...
Try this. Note the separate table constraint.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|