Is there anyway to have a column reference the amount of rows of another table based on a
where?
Something like:
- Code: Select all
create table tbl (
[columns here]
amount int(100) REFERENCES othertbl(COUNT(*) FROM othertbl GROUP BY column)
)
It's hard to explain what I mean, but that example should help.
Thanks.