Welcome to Sign in | Help

Re: relationare intre tabele in SQL

  •  04-21-2008, 10:40 PM

    Re: relationare intre tabele in SQL

    In script se poate folosi ALTER TABLE table_name cu  , citez din Books Online "< column_constraint > ::=
       [ NULL | NOT NULL ]
       [ CONSTRAINT constraint_name ]
       {
          | { PRIMARY KEY | UNIQUE }
          | REFERENCES ref_table [ (ref_column) ]
          [ ON DELETE { CASCADE | NO ACTION | SET DEFAULT |SET NULL } ]
          [ ON UPDATE { CASCADE | NO ACTION | SET DEFAULT |SET NULL } ] "

    altfel, daca va referiti la aspectul crearii automate a relatiilor intre tabele se poate folosi "Database Diagrams" unde legati cheile potrivite dintre tabele.
    Gheorghe Ciubuc,SQL Server Influencer, MCP(SQL 2000), MCTS (SQL Server 2005) , OCA(Oracle 9i), Sybase(Brainbench)
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems