Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Relationship

Reply
Thread Tools

Relationship

 
 
shapper
Guest
Posts: n/a
 
      04-05-2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      04-05-2007
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
>
>

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      04-06-2007
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...

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server 2000 question: What's the relationship between users and logins Leonard Martin MCSD 0 12-05-2005 09:15 PM
DataGridTableStyle and relationship dbuchanan ASP .Net 1 11-29-2005 06:39 PM
Bind optional one-to-one relationship to textbox Dan Davenport via .NET 247 ASP .Net 0 08-04-2004 01:55 PM
Relationship between Mozilla, Firefox and Thunderbird Lionel B. Dyck Firefox 6 07-19-2004 09:14 AM
Data Relationship binding Leon Shaw ASP .Net 1 07-11-2003 10:14 PM



Advertisments