Hi all!
I want to create a constraint that uses data from other tables,
specifically i want to make sure that a varchar has exactly the length
specified in an integer-column in a table that I pointed out with a
foreign key.
I would like this to be solved something like this:
create table string_size_lim its
(
row_id INTEGER PRIMARY KEY
string_size INTEGER
)
create table strings
(
string_size_lim it_row_id INTEGER
REFERENCES string_size_lim its(row_id)
string varcher(50)
CONSTRAINT check_string_si ze CHECK ???
)
Is it possible to solve this problem without SP using above model?
Is it possible to solve this problem with SP using above model?
Must the above problem be solved using triggers?
Any help appreciated
I want to create a constraint that uses data from other tables,
specifically i want to make sure that a varchar has exactly the length
specified in an integer-column in a table that I pointed out with a
foreign key.
I would like this to be solved something like this:
create table string_size_lim its
(
row_id INTEGER PRIMARY KEY
string_size INTEGER
)
create table strings
(
string_size_lim it_row_id INTEGER
REFERENCES string_size_lim its(row_id)
string varcher(50)
CONSTRAINT check_string_si ze CHECK ???
)
Is it possible to solve this problem without SP using above model?
Is it possible to solve this problem with SP using above model?
Must the above problem be solved using triggers?
Any help appreciated
Comment