Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. triggers

triggers

Scheduled Pinned Locked Moved Database
help
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dandamudi padma
    wrote on last edited by
    #1

    hi i had to create Rowlevel triggers and my req is-- if a new row is added in table1 then the same current row has to be updated in my table2.please can anybody help me padma

    D 2 Replies Last reply
    0
    • D dandamudi padma

      hi i had to create Rowlevel triggers and my req is-- if a new row is added in table1 then the same current row has to be updated in my table2.please can anybody help me padma

      D Offline
      D Offline
      DerekFL
      wrote on last edited by
      #2

      CREATE TRIGGER sdfsd ON Table1 FOR UPDATE IF (UPDATE(Column1) UPDATE Table2 SET Column1 = i.Column1 FROM Table2 t2 INNER JOIN INSERTED i ON i.RowID = t2.RowID

      1 Reply Last reply
      0
      • D dandamudi padma

        hi i had to create Rowlevel triggers and my req is-- if a new row is added in table1 then the same current row has to be updated in my table2.please can anybody help me padma

        D Offline
        D Offline
        DerekFL
        wrote on last edited by
        #3

        dandamudi padma wrote:

        if a new row is added in table1

        Did you mean when a row is UPDATE same row has to be updated on table2?

        D 1 Reply Last reply
        0
        • D DerekFL

          dandamudi padma wrote:

          if a new row is added in table1

          Did you mean when a row is UPDATE same row has to be updated on table2?

          D Offline
          D Offline
          dandamudi padma
          wrote on last edited by
          #4

          thanks for ur reply but what i mean is if a row is inserted in table1 after insert the same row has to be Inserted in table2. can u give solution for this Regards padma padma

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups