Difference between writing SQL query and stored procedure ?
Answers were Sorted based on User's Feedback
Answer / ramneet
SP is good for security purpose, as it grant privileges to
the use.........
| Is This Answer Correct ? | 23 Yes | 20 No |
Answer / shivangi rastogi
in sql query,there is not security features since when we
write a query in our programe,through ildasm command it
will show thw query to the public.
in stored procedure,we named a set of query & it works as a
file name whenever anyone checks the query it ll find the
procedure name not that query onwhich our programe is
running.
in sql query,if any error in query it ll compiled & show
error at runtime,which is not in stored procedure.
| Is This Answer Correct ? | 8 Yes | 5 No |
Answer / anbu arunmozhi
Query execute every time when ever u call that statement
but stored procedure execute only one time v can used every time it should be very efficient compare query
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / tmp
the main advantages is Execution Plan Retention and Reuse (SP are compiled and their execution plan is cached and used again to when the same SP is executed again)
http://blog.sqlauthority.com/2007/04/13/sql-server-stored-procedures-advantages-and-best-advantage/
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / komal sankhe
compared with sql query, stored procedure is efficient and
timesaving execution.Because stored procedure is program
once it formed then execute as a program at the same
time.coz queries are taking the time
| Is This Answer Correct ? | 19 Yes | 22 No |
What is the difference between 2-Tier architecture and 3-Tier architecture
15 Answers CTS, MCN Solutions, Oracle,
Explain difference between control flow and data flow?
Can you use order by when defining a view?
Does sql server 2000 full-text search support clustering?
What are acid properties of transaction?
How can you stop stored procedures from recompiling?
how many non clustered index in sql server 2008,2010,2012
Do you know what are the restrictions applicable while creating views? : SQL Server Architecture
Mention the uses of stored procedures.
tell me what are the steps you will take to improve performance of a poor performing query? : Sql server database administration
Mention the differences between substr and charindex in sql server.
what is trigger
1 Answers CarrizalSoft Technologies, NIIT,
Oracle (3259)
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)