How to debug trigger

xiaoxiao2021-03-06  64

// ------------------------------------ debug trigger // ------ ------------------------------- author: cosmopolitan circle (original) // --------- ---------------------------- 1, create a stored procedure to trigger the trigger 3, select a single step running stored procedure 2, triggering events The statement is as follows: INSERT, UPDATE, DELETE statement Press F11 / / --------------------------------- - This method is in SQL Server 2000 Win2000 Server through the test this method in VS.NET 2003 SQL Server 2000 Win2000 Server passed the test // ----------------- ------------------ Good repost, please indicate the source to maintain the network morality is the obligation of every netizen // ------------- --------------------- Instance Teaching: 1. Open SQL Query Analyzer 2, copy the following SQL statements to the query window and run Use Pubscreate Trigger Trigger_Update on Authorsfor Updateasbegin Print ('update lastname = HOHO') endcreate proc authors_procinsertas begin Update Authors Set au_lname = 'HOHO' Where au_id = '172-32-1176'end

Third, select the Pubs-> stored procedure in the left object browser in Authors_Procinsert (if not, please refresh the PUBS database), right-click the pop-up menu to select "Debug ..." four, when running to "Update Authors set au_lname = ' When HOHO 'WHERE AU_ID =' 172-32-1176 '", press" F11 "to enter the trigger code

转载请注明原文地址:https://www.9cbs.com/read-89312.html

New Post(0)