SQL Data Manipulation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Walter Thizo
    New Member
    • Oct 2008
    • 13

    SQL Data Manipulation

    I am new i SQL and i want to update,insert and delete using multiple related tables for instance

    Table 1 and Table 2 - When i update table one also the related field in table 2 must be updated ...


    Thanks
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Lots of ways:

    1. Issue two statements.

    or

    2. Create an updateable view.

    or

    3. Use ON UPDATE CASCADE

    It all depends on your requirement. Is this a one time thing? Why don't you post some sample data and your requirement.

    -- CK

    Comment

    • Walter Thizo
      New Member
      • Oct 2008
      • 13

      #3
      That is what i code

      INSERT C.CustName,O.Or derDate
      INTO Customer C , Order O
      WHERE O.OrderNo=C.Ord erNo
      VALUES ('Lee','20/11/2008')

      Correct me because i haven't test as my SQL Server is not working at moment.

      Comment

      Working...