i have two tables in my sql database one is "vendor" and other "purchase_order" they both have one common attribute "vendor_name" my problem is that i want vendor name in my "purchase_order" table to be same as that in "vendor" table but vendor_name is not a primary key in "vendor" table so i cannot use primary key_foreign_key reference. what should i use??
arbazpathan
0
Newbie Poster
Recommended Answers
Jump to PostWhat are you trying to do with this? How much volume/read-writes?
You can create a trigger that will verify that your vendor_name exists in the vendor table, but that will slow down your table and in a high traffic environment it can be a problem.
If the purchase_order get's handled …
All 4 Replies
adam_k
239
Master Poster
tesuji
135
Master Poster
arbazpathan
0
Newbie Poster
adam_k
239
Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.