Stored procedure:
create|alter procedure<name>[parameters] (here parameters are optional)
as
begin
statements
end
Triggers:
create |alter trigger<name>
on <tablename>
after|instead of insert,update,delete
as
begin
.......statements.........
end
- Stored procedures are executed explicitly.
- Procedure can be created without a table.
- procedure accepts parameters.
- procedure can return values.
- procedure can be called from front-end Application.
create|alter procedure<name>[parameters] (here parameters are optional)
as
begin
statements
end
Triggers:
- Triggers are executed implicitly.
- Trigger can't be created without a table.
- Trigger can't return values.
- Trigger can't be called from front-end Application
create |alter trigger<name>
on <tablename>
after|instead of insert,update,delete
as
begin
.......statements.........
end
No comments:
Post a Comment