![]() |
|
|
|
#1 |
|
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 |
|
|
|
|
#2 |
|
Posts: n/a
|
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=?= |
|
|
|
#3 |
|
Posts: n/a
|
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 |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: master/slave terms banned | Jinkies | A+ Certification | 6 | 11-26-2003 01:17 AM |