Groups | Blog | Home
all groups > sql server connect > august 2007 >

sql server connect : SQL 2005 Express


Charlie
8/2/2007 8:15:20 PM
I am new to SQL Server, and using the Express edition. I can't seem to find
the way to create relationships between tables. Any reference info will be
appreciated.

Andrew J. Kelly
8/3/2007 12:00:00 AM
You can look up ALTER TABLE in BooksOnLine for the full details but the
syntax is nothing special. Here is a sample from BOL:

ALTER TABLE Person.ContactBackup
ADD CONSTRAINT FK_ContactBacup_Contact FOREIGN KEY (ContactID)
REFERENCES Person.Contact (ContactID) ;

If you are talking about a graphical way I am not sure what the express
version of Management Studio supports but the table designer has a section
for Foreign Keys.

--
Andrew J. Kelly SQL MVP

[quoted text, click to view]

William Vaughn
8/3/2007 9:25:05 AM
Do you have any tools like Visual Studio? Try creating a Database Diagram.
This has a tool to build relationships using a GUI interface. This is
described in detail in my book.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

[quoted text, click to view]
DB
8/7/2007 6:52:00 PM
Hi Charlie I think you will find what you are looking in one of these many
great learning videos at this microsoft developer site. good luck

http://msdn.microsoft.com/vstudio/express/sql/learning/default.aspx

[quoted text, click to view]
AddThis Social Bookmark Button