{"id":28,"date":"2020-01-07T12:00:46","date_gmt":"2020-01-07T12:00:46","guid":{"rendered":"https:\/\/molecularsciences.org\/content\/?p=28"},"modified":"2024-02-09T13:40:42","modified_gmt":"2024-02-09T18:40:42","slug":"what-is-pl-sql","status":"publish","type":"post","link":"https:\/\/molecularsciences.org\/content\/what-is-pl-sql\/","title":{"rendered":"What is PL\/SQL"},"content":{"rendered":"\n<p>Procedural Language extension of SQL (PL\/SQL) combines SQL with procedural programming features such as looping, conditionals, and reusable blocks. PL\/SQL engine processes PL\/SQL statements. PL\/SQL statements can reside on the client on server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PL\/SQL Blocks<\/h3>\n\n\n\n<p>PL\/SQL blocks are made up of PL\/SQL and SQL statements. A block is a functional unit made up of an optional declaration section, an execution section, and an optional exception or error handling section. A block has the following syntax<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DECLARE\n  variable declaration\nBEGIN\n  Program Execution\nEXCEPTION\n  Exception handling\nEND;\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">PL\/SQL constants, variables, and records<\/h3>\n\n\n\n<p>PL\/SQL variables have type and scope. The have the following syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>name datatype &#91;NOT NULL := value];\n<\/code><\/pre>\n\n\n\n<p>not null and value are optional. All statements end with a semicolon (;).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setting up environment to run PL\/SQL<\/h3>\n\n\n\n<p>This sections shows how to setup an environment to setup and run PL\/SQL. For PL\/SQL, you need to download two pieces of software freely available from Oracle.<\/p>\n\n\n\n<p>First, download&nbsp;<a target=\"_blank\" href=\"http:\/\/www.oracle.com\/technetwork\/database\/express-edition\/downloads\/index.html\" rel=\"noreferrer noopener\">Oracle Express Edition<\/a>. It is a lighter version of Oracle, good enough for non-enterprise level work. In addition, it is a much smaller download.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Download Oracle Express Edition<\/li><li>Unzip<\/li><li>Double-click on setup.exe<\/li><li>Follow instructions. It will ask you for a password. Write this password or memorize it.<\/li><\/ol>\n\n\n\n<p>When installation is complete, start the software. You will be prompted for a username and password.<\/p>\n\n\n\n<p><strong>Your username is SYS Your password is whatever you typed during installation<\/strong><\/p>\n\n\n\n<p>Next, download and install<a target=\"_blank\" href=\"http:\/\/www.oracle.com\/technetwork\/developer-tools\/sql-developer\/downloads\/index.html\" rel=\"noreferrer noopener\">sqldeveloper<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Download sqldeveloper<\/li><li>Unzip<\/li><li>Double-click to install<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Procedural Language extension of SQL (PL\/SQL) combines SQL with procedural programming features such as looping, conditionals, and reusable blocks. PL\/SQL engine processes PL\/SQL statements. PL\/SQL statements can reside on the client on server. PL\/SQL Blocks PL\/SQL blocks are made up of PL\/SQL and SQL statements. A block is a functional unit made up of an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,515],"tags":[14,3],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-database","category-oracle","tag-database","tag-oracle"],"_links":{"self":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":1,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":29,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/28\/revisions\/29"}],"wp:attachment":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}