Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,207,918 members, 8,000,818 topics. Date: Tuesday, 12 November 2024 at 04:03 PM

Help On Sql , Trigger In Partcular! - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Help On Sql , Trigger In Partcular! (718 Views)

Help Out! On SQL INJECTION / Video Tutorials On SQL, For Free / Help On SQL!!! (2) (3) (4)

(1) (Reply)

Help On Sql , Trigger In Partcular! by lolade123: 12:59pm On Jan 18, 2011
Hello gurus in da house,am a student and i have a problem on trigger.And the question goes thus:
When a new row is added to a table A , a column X in table B should be increased by one.
Now i need you guys to give me the clue to do this,
or if there is anyone who could write the statement for me.I really do appreciate you all thanks.
Re: Help On Sql , Trigger In Partcular! by Bossman(m): 7:12pm On Jan 18, 2011
Depending on your database of choice, this may vary a little. You can also google for better examples. Just typing this off the top of my head.

create trigger update
on TableB
for update as
if insert(table A)
begin
update table B
set column_B1 = columnB1 + 1
where ,
end

(1) (Reply)

How You Should Respond To Questions In Programming Threads / Where To Get Java Compiler. / Please I Need Help In FORTRAN PROGRAM

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.