What is the difference function and stored procedure?
Answer / Shoorbir Singh
Function and Stored Procedure are both used for encapsulating SQL code in SQL Server, but they have some differences:
1. Function is a collection of Transact-SQL statements that returns a single scalar value, table value or cursor as a result. It can be called from SELECT, INSERT, UPDATE and DELETE statements.
2. Stored Procedure is a prepared SQL code module saved in the database. It can contain one or more Transact-SQL statements and can return a single scalar value, table value or cursor as a result (like functions). However, it cannot be used within other SQL statements directly.
| Is This Answer Correct ? | 0 Yes | 0 No |
Difference between Function and Stored Procedure?
Define constraints and give an example of their use?
What happens if the update subquery returns multiple rows in ms sql server?
How to encrypt Strored Procedure in SQL SERVER?
What is normalization? Explain different forms of normalization?
Explain features and concepts of analysis services?
What is create command?
What are different type of Collation Sensitivity?
what is replication? where do u use Go Keyword?
What is a livelock?
What is a constant or literal in ms sql server?
Differentiate between a having clause and a where clause.
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)