{"id":350,"date":"2020-01-24T11:58:22","date_gmt":"2020-01-24T11:58:22","guid":{"rendered":"http:\/\/lotusithub.com\/blog\/?p=350"},"modified":"2020-01-24T11:58:22","modified_gmt":"2020-01-24T11:58:22","slug":"difference-between-sql-and-plsql","status":"publish","type":"post","link":"https:\/\/lotusithub.com\/blog\/difference-between-sql-and-plsql\/","title":{"rendered":"Difference Between SQL and PLSQL:"},"content":{"rendered":"<h3><span style=\"font-weight: 400;\">The following are the important differences between SQL and PL\/SQL.<\/span><\/h3>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-355\" src=\"https:\/\/growbizzserver.in\/lotusithub\/blog\/wp-content\/uploads\/2020\/01\/Oracle-DBA-training.png\" alt=\"Difference Between SQL and PLSQL\" width=\"810\" height=\"450\" srcset=\"https:\/\/lotusithub.com\/blog\/wp-content\/uploads\/2020\/01\/Oracle-DBA-training.png 810w, https:\/\/lotusithub.com\/blog\/wp-content\/uploads\/2020\/01\/Oracle-DBA-training-300x167.png 300w, https:\/\/lotusithub.com\/blog\/wp-content\/uploads\/2020\/01\/Oracle-DBA-training-768x427.png 768w, https:\/\/lotusithub.com\/blog\/wp-content\/uploads\/2020\/01\/Oracle-DBA-training-585x325.png 585w\" sizes=\"(max-width: 810px) 100vw, 810px\" \/><\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Sr. No.<\/b><\/td>\n<td><b>Key<\/b><\/td>\n<td><b>SQL<\/b><\/td>\n<td><b>PL\/SQL<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Definition<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SQL, is Structural Query Language for database.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">PL\/SQL is a programming language using SQL for a database.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Variables<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SQL has no variables.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">PL\/SQL has variables, data types etc.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Variable declaration<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Column declaration<\/span><\/td>\n<td><span style=\"font-weight: 400;\">A int:=100;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">B varcharchar2(20):=\u2019Lotus it hub\u2019;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Control Structures<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SQL has no FOR loop, if control and similar structures.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">PL\/SQL has FOR loop, while loop, if controls and other similar structures.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">5<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Basic c<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Sql doesn\u2019t require to know c language.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Plsql require to know c language.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">6<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Operations<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SQL can execute a single operation at a time.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">PL\/SQL can perform multiple operations at a time.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">7<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Language Type<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SQL is a declarative language.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">PL\/SQL is a procedural language.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">8<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Embedded<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SQL can be embedded in a PL\/SQL block.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">PL\/SQL can also be embedded in SQL code.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">9<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Interaction<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SQL directly interacts with database server.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">PL\/SQL does not directly interact with database server.<\/span><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">10<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Fetch\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Select * from table_name<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Declare<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Begin<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Dbms_output.put_line(\u2018Lotus IT Hub!!\u2019);<\/span><\/p>\n<p><span style=\"font-weight: 400;\">End;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\/<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">8<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Objective<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SQL is used to write queries, create and execute DDL and DML statements.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">PL\/SQL is used to write program blocks, functions, procedures, triggers and packages.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: center;\"><a class=\"maxbutton-3 maxbutton maxbutton-enroll-now\" href=\"https:\/\/www.lotusithub.com\/contact.html\"><span class='mb-text'>ENROLL NOW<\/span><\/a><\/p>\n<h2><b>PL\/SQL Data Types<\/b><\/h2>\n<table>\n<tbody>\n<tr>\n<td><b>Data Type<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Size<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">BFILE<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Used to store large binary objects in operating system files outside the database.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">System-dependent. Cannot exceed 4 gigabytes (GB).<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">BLOB<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Used to store large binary objects in the database.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">8 to 128 terabytes (TB)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">CLOB<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Used to store large blocks of character data in the database.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">8 to 128 TB<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">NCLOB<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Used to store large blocks of NCHAR data in the database.<\/span><\/td>\n<td><span style=\"font-weight: 400;\">8 to 128 TB<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">int<\/span><\/td>\n<td><span style=\"font-weight: 400;\">-2,147,483,648<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2,147,483,647<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">datetime<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Jan 1, 1753<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Dec 31, 9999<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">float<\/span><\/td>\n<td><span style=\"font-weight: 400;\">-1.79E + 308<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1.79E + 308<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">real<\/span><\/td>\n<td><span style=\"font-weight: 400;\">-3.40E + 38<\/span><\/td>\n<td><span style=\"font-weight: 400;\">3.40E + 38<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: center;\"><a class=\"maxbutton-2 maxbutton maxbutton-enroll-now\" href=\"https:\/\/www.lotusithub.com\/contact.html\"><span class='mb-text'>Request For Call Back<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following are the important differences between SQL and PL\/SQL. &nbsp; Sr. No. Key SQL&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[77,118,119,120],"class_list":["post-350","post","type-post","status-publish","format-standard","hentry","category-sql-classes","tag-differences-between-sql-and-pl-sql","tag-pl-sql","tag-plsql","tag-plsql-classes"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/posts\/350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/comments?post=350"}],"version-history":[{"count":0,"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/posts\/350\/revisions"}],"wp:attachment":[{"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/media?parent=350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/categories?post=350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lotusithub.com\/blog\/wp-json\/wp\/v2\/tags?post=350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}