View Single Post
  #1 (permalink)  
Old Jan 30th, 2008, 22:21
alexgeek's Avatar
alexgeek alexgeek is offline
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,800
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Foreign Key references some

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.
Reply With Quote