difference between Sql(Structured query lanquage) and pl/sql

Posted by Rajeshk under Sql Server on 11/15/2012 | Points: 10 | Views : 5050 | Status : [Member] | Replies : 5
Hi All,
can anybody tell me the duffrerence between sql and pl/sql? with some real time example thank you

Thanks&Regards
rajeshkommireddy@gmail.com



Responses

Posted by: Deepraj on: 11/15/2012 [Member] Starter | Points: 25

Up
0
Down
SQL is a query language that allows you to issue a single query or execute a single insert/update/delete. PL-SQL is Oracle's "Programming Langugage" SQL, which allows you to write a full program (loops, variables, etc.) to accomplish multiple selects/inserts/updates/deletes. You should learn SQL first, then move on to PL-SQL. You will probably need both to be an Oracle DBA.


SQL tells the database what to do (declarative), not how to do it. In contrast, PL/SQL tell the database how to do things (procedural).

Refer the following link.
http://www.plsql-tutorial.com/

Rajeshk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajeshk on: 11/16/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Deep,

Thank You For your Replay can ms- sql users use this(pl/sql)? or oracle users only and also give me a simple pl/sql example

Thanks&Regards
rajeshkommireddy@gmail.com

Rajeshk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Saratvaddilli on: 11/16/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi rajesh,
pl/sql was designed by the oracle and we will not use (pl/sql) in sql server but it was used in IBM DB2 .
DECLARE

Variable declaration // here we declare variables
BEGIN
Program Execution // here we do program execution
EXCEPTION
Exception handling // here we do exception handling
END;


Thanks and Regards
V.SaratChand
Show difficulties that how difficult you are

Rajeshk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajeshk on: 11/16/2012 [Member] Starter | Points: 25

Up
0
Down
Thank you very much sarat but it was like stored procedure na? can you differentiate

Thanks&Regards
rajeshkommireddy@gmail.com

Rajeshk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Saratvaddilli on: 11/16/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
we can say that both are identical but pl/sql function will always return a value

Thanks and Regards
V.SaratChand
Show difficulties that how difficult you are

Rajeshk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response