All Forums Database
punitgupta87 4 posts Joined 03/14
31 Mar 2015
Enforce row count in a table

Hi all
I have a table like BUSINESS_DATE_TBL which has 2 column of 1 date type and other varchar( this is one i use to create parameter).
my complete production load is dependent on this table as date in this table ensures for which day load will be triggered.
 
Is there any way in teradata at DDL to enforce that no other row can be inserted in this table if 1 row already exist.
 
Thanks in advance.

dnoeth 4628 posts Joined 11/04
02 Apr 2015

You could use a trigger or add a dummy column:
col NOT NULL UNIQUE DEFAULT 1 CHECK (col = 1)

Dieter

You must sign in to leave a comment.