Wednesday, August 29, 2012

Difference between View and Stored Procedure


S.NoViewStored Procedure
1Does not accepts parametersAccept parameters
2Can be used as a building block in large query.Cannot be used as a building block in large query.
3Can contain only one single Select query.Can contain several statement like if, else, loop etc.
4Cannot perform modification to any table.Can perform modification to one or several tables.
5Can be used (sometimes) as the target for Insert, update, delete queries.Cannot be used as the target for Insert, update, delete queries.

1 comment:

  1. HI hardik Ramwani ,
    using sp Cannot be used as the target for Insert, update, delete queries.can u give me any sample for this?

    can you give me briefly about above point?

    ReplyDelete