Register    Login    Forum    Search    FAQ

Board index » Programming » Aplikasi Database




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: sql data base
 Post Posted: 29 Oct 2009, 18:44 
Offline
Newbie
Newbie

Joined: 29 Oct 2009, 18:36
Posts: 1
hai bos ...minta tolong boleh donk??heueheu.... :lol:
minta contoh sricpt buat membangun triger di sql server dunk....


Top 
 Profile  
 
 Post subject: Re: sql data base
 Post Posted: 03 Nov 2009, 18:51 
Offline
Newbie
Newbie

Joined: 03 Nov 2009, 18:43
Posts: 1
anda akan membuat generate script Triger dengan Bhs Program apa?


secara Umum syntaxnya sebagai berikut

CREATE TRIGGER conditionalinsert
ON sales
AFTER INSERT AS
IF
(SELECT COUNT(*) FROM titles, inserted
WHERE titles.title_id = inserted.title_id) <> @@ROWCOUNT
BEGIN
DELETE sales FROM sales, inserted
WHERE sales.title_id = inserted.title_id AND
inserted.title_id NOT IN
(SELECT title_id
FROM titles)
PRINT 'Only sales records with matching title_ids added.'
END


kurang lebih seperti itu... klo selama struktur database sudah baik...biasanya kondisi Trigger tidak terlalu diperlukan.... tinggal menggunkan relasi database .

thanks :idea:


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 2 posts ] 

Board index » Programming » Aplikasi Database


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron