TVP insertion

i have a bunch of user-defined table TYPES, to which i am doing table-valued parm insertions.

suddenly the table def needs to change, and i need to put FK's on two values within the target tables, that are written to with these TVP's.

i can put FK's on the target tables, right?  they needn't go on the TYPE tables, too, do they?
what's the best way to handle that?
LVL 18
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
You can't create Foreign Key constraints on a Type table.
You would be able to create just Primary and Unique Keys constraints on a type table and not Foreign Keys..

And may I know the exact thing why you went for a user defined table type instead of a table..

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dbaSQLAuthor Commented:
yes, i realize they can't go onto the TYPEs, but i'm just saying that's not really a big deal, and I'd put them onto the regular tables themselves.  right?

i didn't go for a table type instead of a table, i am inserting into a regular table via the table types, simply for massive data inserts.  i use the table-valued-parameter insert thru my table types, to do the large inserts in fewer round trips from client to server

i know i can put unique constraints or pk's onto the table types, but i'm just wondering... is it sufficient merely to put the FK's into place on the target table

going to try it out now
dbaSQLAuthor Commented:
yep.  seems to work just fine.  though i answered my own inquiry, i will award and close.  thank you for looking
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.