Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Relationship

 
Thread Tools Search this Thread
Old 04-05-2007, 06:44 PM   #1
Default Relationship


Hello,

I created some SQL 2005 tables using Microsoft SQL Server Management
Studio.
I know wanted to get the script code of those tables.
I was able to do that by right clicking over each table.

But how can I get the code for the relationships between the tables?

Thanks,
Miguel



shapper
  Reply With Quote
Old 04-05-2007, 07:10 PM   #2
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
 
Posts: n/a
Default RE: Relationship
If you choose CREATE to script table to a new window, it should replicate the
T-SQL to create the relationships you have defined.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"shapper" wrote:

> Hello,
>
> I created some SQL 2005 tables using Microsoft SQL Server Management
> Studio.
> I know wanted to get the script code of those tables.
> I was able to do that by right clicking over each table.
>
> But how can I get the code for the relationships between the tables?
>
> Thanks,
> Miguel
>
>



=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
  Reply With Quote
Old 04-06-2007, 11:08 AM   #3
Alexey Smirnov
 
Posts: n/a
Default Re: Relationship
On Apr 5, 7:44 pm, "shapper" <mdmo...@gmail.com> wrote:
> Hello,
>
> I created some SQL 2005 tables using Microsoft SQL Server Management
> Studio.
> I know wanted to get the script code of those tables.
> I was able to do that by right clicking over each table.
>
> But how can I get the code for the relationships between the tables?
>
> Thanks,
> Miguel


In Object Explorer right click on a table, Script Table As... point to
Create

It will generate the DDL script with foreign key relationships
(dependencies to other tables on which the table depends)

To view the dependencies of a table, right-click a table, and then
click View Dependencies...



Alexey Smirnov
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: master/slave terms banned Jinkies A+ Certification 6 11-26-2003 01:17 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46