DQ 2
DQ 2
Example: Assume that the attributes Student id, Name, Address, and Marks are present in a
table called Student. As a result, we need to develop a trigger that, each time a new student is
added to the table, will add 100 marks to each new row of the Marks column. The SQL Trigger
is going to be:
Example: The following SQL statement creates a stored procedure named "SelectAllCustomers"
that selects all records from the "Customers" table:
CREATE PROCEDURE SelectAllCustomers
AS
SELECT * FROM Customers
GO;
EXEC SelectAllCustomers; [to execute]