<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3194838094034727792</id><updated>2024-09-10T19:21:44.702-07:00</updated><category term="SQL CREATE"/><category term="SQL statements"/><category term="Oracle Constraints"/><category term="Oracle PRIMARY KEY"/><category term="Oracle SQL*Plus"/><category term="Oracle Synonyms"/><category term="PL/SQL CASE"/><category term="SQL"/><category term="SQL GROUP BY"/><category term="Oracle DUAL table"/><category term="Oracle Index"/><category term="Oracle Tips"/><category term="Oracle Transactions"/><category term="Oracle datatypes"/><category term="Oracle example table"/><category term="Oracle naming"/><category term="Oracle starting"/><category term="PL/SQL"/><category term="PL/SQL DECODE"/><category term="PL/SQL FOR"/><category term="PL/SQL NULLIF"/><category term="PL/SQL NVL"/><category term="PL/SQL RPAD"/><category term="PL/SQL TRIM"/><category term="PL/SQL examples"/><category term="SQL ALL"/><category term="SQL ALTER TABLE"/><category term="SQL ANY"/><category term="SQL AVG"/><category term="SQL CAST"/><category term="SQL COMMIT"/><category term="SQL DELETE"/><category term="SQL DISTINCT"/><category term="SQL DROP"/><category term="SQL EXISTS"/><category term="SQL GRANT"/><category term="SQL HAVING"/><category term="SQL IN"/><category term="SQL INSERT"/><category term="SQL JOINs"/><category term="SQL LIKE"/><category term="SQL MERGE"/><category term="SQL ORDER BY"/><category term="SQL Operators"/><category term="SQL REVOKE"/><category term="SQL ROLLBACK"/><category term="SQL ROWID"/><category term="SQL SOME"/><category term="SQL Subqueries"/><category term="SQL TRUNCATE"/><title type='text'>YouOracle</title><subtitle type='html'>Simple Oracle&#xa;&lt;a href=&quot;http://www.twitter.com/zeynal&quot;&gt;&lt;img src=&quot;http://twitter-badges.s3.amazonaws.com/t_mini-a.png&quot; alt=&quot;Follow zeynal on Twitter&quot;&gt;&lt;/a&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15176391138914516876</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-3185114157691559609</id><published>2010-09-15T00:32:00.000-07:00</published><updated>2010-09-15T00:33:24.265-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PL/SQL DECODE"/><title type='text'>How to use PL/SQL Decode?</title><content type='html'>DECODE(expression, searchedValue, returnValues ...) function is used to search a value in a column or expression as it is done in IF-ELSE statements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;SELECT id, DECODE(id, 1, &#39;First row&#39;, 2, &#39;Second row&#39;) FROM students;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/3185114157691559609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/09/how-to-use-plsql-decode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/3185114157691559609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/3185114157691559609'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/09/how-to-use-plsql-decode.html' title='How to use PL/SQL Decode?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-1234564272939348704</id><published>2010-09-12T21:48:00.000-07:00</published><updated>2010-09-12T21:48:48.865-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PL/SQL NULLIF"/><title type='text'>How to use NULLIF?</title><content type='html'>NULLIF(a, b) function compares a and b, if they are equal then it returns NULL, else returns a.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;SELECT NULLIF(&#39;Zeynal&#39;, name) FROM students;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/1234564272939348704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/09/how-to-use-nullif.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/1234564272939348704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/1234564272939348704'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/09/how-to-use-nullif.html' title='How to use NULLIF?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-8741636218547778556</id><published>2010-08-26T02:36:00.000-07:00</published><updated>2010-08-26T02:36:54.965-07:00</updated><title type='text'>How to get Oracle database name?</title><content type='html'>We can get current database name from select &lt;b&gt;v$database&lt;/b&gt; table.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;SELECT name FROM v$database;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/8741636218547778556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-get-database-name.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/8741636218547778556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/8741636218547778556'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-get-database-name.html' title='How to get Oracle database name?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-7701440059938381851</id><published>2010-08-25T22:42:00.000-07:00</published><updated>2010-08-25T22:42:18.518-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL CREATE"/><title type='text'>How to create a role?</title><content type='html'>&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Create role named &lt;i&gt;changer &lt;/i&gt;on table students that will be able to &lt;i&gt;update &lt;/i&gt;it. And give this role to user &lt;i&gt;zeynal&lt;/i&gt; and &lt;i&gt;david&lt;/i&gt;.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;CREATE ROLE changer;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;GRANT UPDATE ON students TO changer;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;GRANT changer TO zeynal, david;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/7701440059938381851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-create-role.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/7701440059938381851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/7701440059938381851'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-create-role.html' title='How to create a role?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-6005784221784968397</id><published>2010-08-25T21:53:00.000-07:00</published><updated>2010-08-25T23:33:23.698-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL REVOKE"/><title type='text'>How to revoke privileges of a user on an object?</title><content type='html'>&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Get SELECT, UPDATE privileges on &lt;i&gt;students &lt;/i&gt;table back those were given to user &lt;i&gt;zeynal&lt;/i&gt;.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;REVOKE SELECT, UPDATE ON students FROM zeynal&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;
&lt;br /&gt;
Note: If we revoke a privilege from user who had distibuted this role to others by WITH GRANT OPTION, revoke will get this privilige from those people also.</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/6005784221784968397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-revoke-privileges-of-user-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/6005784221784968397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/6005784221784968397'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-revoke-privileges-of-user-on.html' title='How to revoke privileges of a user on an object?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-6101522746209105375</id><published>2010-08-25T21:44:00.000-07:00</published><updated>2010-08-25T21:50:00.175-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL GRANT"/><title type='text'>How to give grant on an object?</title><content type='html'>&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Give SELECT, UPDATE grants on &lt;i&gt;students &lt;/i&gt;table to user &lt;i&gt;zeynal&lt;/i&gt;. And also he will be able to grant this roles to anyone.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;GRANT SELECT, UPDATE ON students TO zeynal WITH GRANT OPTION&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;
&lt;br /&gt;
Note: if we want to give all privileges we can use ALL clause,&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;GRANT ALL ON students TO zeynal WITH GRANT OPTION&lt;/span&gt;&lt;/span&gt;;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/6101522746209105375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-give-grant-on-object.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/6101522746209105375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/6101522746209105375'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-give-grant-on-object.html' title='How to give grant on an object?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-1956654464002536355</id><published>2010-08-25T21:34:00.000-07:00</published><updated>2010-08-25T21:34:31.333-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL CREATE"/><title type='text'>How to create new user at Oracle?</title><content type='html'>&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Create new user named &lt;i&gt;zeynal &lt;/i&gt;with password &lt;i&gt;mypass&lt;/i&gt;&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;CREATE USER zeynal IDENTIFIED BY mypass;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/1956654464002536355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-create-new-user-at-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/1956654464002536355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/1956654464002536355'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-create-new-user-at-oracle.html' title='How to create new user at Oracle?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-1129406726662054884</id><published>2010-08-25T03:43:00.000-07:00</published><updated>2010-08-25T03:43:46.014-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL EXISTS"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL IN"/><title type='text'>How to use Subqueries?</title><content type='html'>Subqueries are used to return a set of rows or a single scalar value to the outer query for several purposes.</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/1129406726662054884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-subqueries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/1129406726662054884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/1129406726662054884'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-subqueries.html' title='How to use Subqueries?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-146591841088785913</id><published>2010-08-25T03:28:00.000-07:00</published><updated>2010-08-25T03:35:18.643-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle example table"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL CREATE"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL INSERT"/><title type='text'>Oracle example table</title><content type='html'>Here is my example Oracle tables. I will refer to these tables at my example SQLs.&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #38761d;&quot;&gt;Table: students&lt;/b&gt;&lt;br /&gt;
&lt;table border=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;th align=&quot;left&quot; bgcolor=&quot;#c0c0c0&quot; bordercolor=&quot;#FFFFFF&quot; style=&quot;background-color: #9fc5e8;&quot;&gt;ID&lt;/th&gt;   &lt;th align=&quot;left&quot; bgcolor=&quot;#c0c0c0&quot; bordercolor=&quot;#FFFFFF&quot; style=&quot;background-color: #9fc5e8;&quot;&gt;NAME&lt;/th&gt;   &lt;th align=&quot;left&quot; bgcolor=&quot;#c0c0c0&quot; bordercolor=&quot;#FFFFFF&quot; style=&quot;background-color: #9fc5e8;&quot;&gt;SURNAME&lt;/th&gt;   &lt;th align=&quot;left&quot; bgcolor=&quot;#c0c0c0&quot; bordercolor=&quot;#FFFFFF&quot; style=&quot;background-color: #9fc5e8;&quot;&gt;BIRTHDAY&lt;/th&gt;   &lt;th align=&quot;left&quot; bgcolor=&quot;#c0c0c0&quot; bordercolor=&quot;#FFFFFF&quot; style=&quot;background-color: #9fc5e8;&quot;&gt;STARTYEAR&lt;/th&gt;   &lt;th align=&quot;left&quot; bgcolor=&quot;#c0c0c0&quot; bordercolor=&quot;#FFFFFF&quot; style=&quot;background-color: #9fc5e8;&quot;&gt;GPA&lt;/th&gt;   &lt;th align=&quot;left&quot; bgcolor=&quot;#c0c0c0&quot; bordercolor=&quot;#FFFFFF&quot; style=&quot;background-color: #9fc5e8;&quot;&gt;COUNTRYCODE&lt;/th&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;1&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;John&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Smart&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;1/1/1987&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;9/1/2002&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;3.43&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;UK&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;2&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Kamil&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Vəliyev&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;8/13/1984&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;9/1/2003&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;3.23&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;AZ&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;3&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;David&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Brown&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;3/2/1980&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;9/1/2004&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;2.33&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;US&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;4&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Fad&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Hown&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;4/12/1985&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;9/1/2003&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;3.44&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;UA&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;5&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Sam&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Jackson&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;4/5/1988&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;9/1/0207&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;3.12&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;ZW&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;6&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Dawn&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Dane&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;2/3/1988&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;9/1/2004&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;3.2&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;TN&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;7&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Emre&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Yüce&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;8/15/1987&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;9/1/2010&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;2.3&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;TR&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;8&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Arif&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Salamov&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;12/11/1983&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;9/1/2008&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;3.2&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;AZ&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;9&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Sad&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Matten&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;2/13/1988&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;9/1/2005&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;4.3&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;TT&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;10&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Zeynal&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;Zeynalov&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;6/9/1984&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;9/1/2001&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;div align=&quot;right&quot;&gt;3.5&lt;/div&gt;&lt;/td&gt;     &lt;td nowrap=&quot;nowrap&quot; style=&quot;background-color: #cfe2f3;&quot;&gt;AZ&lt;/td&gt;   &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;pre&gt;CREATE TABLE  &quot;STUDENTS&quot; 
   ( &quot;ID&quot; NUMBER, 
 &quot;NAME&quot; NVARCHAR2(30) NOT NULL ENABLE, 
 &quot;SURNAME&quot; NVARCHAR2(30) NOT NULL ENABLE, 
 &quot;BIRTHDAY&quot; DATE, 
 &quot;STARTYEAR&quot; DATE, 
 &quot;GPA&quot; NUMBER, 
 &quot;COUNTRYCODE&quot; CHAR(2), 
  CONSTRAINT &quot;STUDENTS_PK&quot; PRIMARY KEY (&quot;ID&quot;) ENABLE
   )
/

&lt;span style=&quot;font-size: small;&quot;&gt;Insert into STUDENTS&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(ID, NAME, SURNAME, BIRTHDAY, STARTYEAR, GPA, COUNTRYCODE)&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Values&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(1, &#39;John&#39;, &#39;Smart&#39;, TO_DATE(&#39;01/01/1987 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), &lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;TO_DATE(&#39;09/01/2002 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), 3.43, &#39;UK&#39;);&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Insert into STUDENTS&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(ID, NAME, SURNAME, BIRTHDAY, STARTYEAR, GPA, COUNTRYCODE)&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Values&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(2, &#39;Kamil&#39;, &#39;Vəliyev&#39;, TO_DATE(&#39;08/13/1984 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), &lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;TO_DATE(&#39;09/01/2003 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), 3.23, &#39;AZ&#39;);&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Insert into STUDENTS&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(ID, NAME, SURNAME, BIRTHDAY, STARTYEAR, GPA, COUNTRYCODE)&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Values&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(3, &#39;David&#39;, &#39;Brown&#39;, TO_DATE(&#39;03/02/1980 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), &lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;TO_DATE(&#39;09/01/2004 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), 2.33, &#39;US&#39;);&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Insert into STUDENTS&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(ID, NAME, SURNAME, BIRTHDAY, STARTYEAR, GPA, COUNTRYCODE)&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Values&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(4, &#39;Fad&#39;, &#39;Hown&#39;, TO_DATE(&#39;04/12/1985 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), &lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;TO_DATE(&#39;09/01/2003 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), 3.44, &#39;UA&#39;);&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Insert into STUDENTS&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(ID, NAME, SURNAME, BIRTHDAY, STARTYEAR, GPA, COUNTRYCODE)&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Values&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(5, &#39;Sam&#39;, &#39;Jackson&#39;, TO_DATE(&#39;04/05/1988 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), &lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;TO_DATE(&#39;09/01/0207 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), 3.12, &#39;ZW&#39;);&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Insert into STUDENTS&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(ID, NAME, SURNAME, BIRTHDAY, STARTYEAR, GPA, COUNTRYCODE)&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Values&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(6, &#39;Dawn&#39;, &#39;Dane&#39;, TO_DATE(&#39;02/03/1988 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), &lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;TO_DATE(&#39;09/01/2004 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), 3.2, &#39;TN&#39;);&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Insert into STUDENTS&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(ID, NAME, SURNAME, BIRTHDAY, STARTYEAR, GPA, COUNTRYCODE)&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Values&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(7, &#39;Emre&#39;, &#39;Yüce&#39;, TO_DATE(&#39;08/15/1987 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), &lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;TO_DATE(&#39;09/01/2010 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), 2.3, &#39;TR&#39;);&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Insert into STUDENTS&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(ID, NAME, SURNAME, BIRTHDAY, STARTYEAR, GPA, COUNTRYCODE)&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Values&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(8, &#39;Arif&#39;, &#39;Salamov&#39;, TO_DATE(&#39;12/11/1983 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), &lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;TO_DATE(&#39;09/01/2008 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), 3.2, &#39;AZ&#39;);&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Insert into STUDENTS&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(ID, NAME, SURNAME, BIRTHDAY, STARTYEAR, GPA, COUNTRYCODE)&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Values&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(9, &#39;Sad&#39;, &#39;Matten&#39;, TO_DATE(&#39;02/13/1988 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), &lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;TO_DATE(&#39;09/01/2005 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), 4.3, &#39;TT&#39;);&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Insert into STUDENTS&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(ID, NAME, SURNAME, BIRTHDAY, STARTYEAR, GPA, COUNTRYCODE)&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Values&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;(10, &#39;Zeynal&#39;, &#39;Zeynalov&#39;, TO_DATE(&#39;06/09/1984 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), &lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;TO_DATE(&#39;09/01/2001 00:00:00&#39;, &#39;MM/DD/YYYY HH24:MI:SS&#39;), 3.5, &#39;AZ&#39;);&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;COMMIT;&lt;/span&gt;

&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/146591841088785913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/example-oracle-students-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/146591841088785913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/146591841088785913'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/example-oracle-students-table.html' title='Oracle example table'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-2733442303507784507</id><published>2010-08-25T03:24:00.000-07:00</published><updated>2010-08-25T03:24:24.582-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Synonyms"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL CREATE"/><title type='text'>How to create synonym?</title><content type='html'>We can create SYNONYM to ease access to objects with short name.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Create synonym &lt;i&gt;st &lt;/i&gt;for students table. &lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;CREATE [PUBLIC] SYNONYM st FOR students;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
PUBLIC keyword is used to create public synonym for everyone&#39;s access.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/2733442303507784507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-create-synonym.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/2733442303507784507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/2733442303507784507'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-create-synonym.html' title='How to create synonym?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-8255674838518863041</id><published>2010-08-25T03:12:00.000-07:00</published><updated>2010-08-25T03:12:29.878-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Index"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL CREATE"/><title type='text'>How to create index on a table?</title><content type='html'>&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Add index named INDEX_NAME to students table on name and surname columns.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;CREATE INDEX INDEX_NAME ON students(name, surname);&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/8255674838518863041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-create-index-on-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/8255674838518863041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/8255674838518863041'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-create-index-on-table.html' title='How to create index on a table?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-2354478531402710271</id><published>2010-08-17T04:07:00.000-07:00</published><updated>2010-08-17T04:08:13.194-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL MERGE"/><title type='text'>How to use SQL MERGE?</title><content type='html'>&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Merge old students table rows into new students table. If the student with same ID at old table exists in new table then update its name, else insert entire row into new table.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;MERGE INTO newStudents new&lt;br /&gt;
USING oldStudents old&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;ON(new.ID = old.ID)&lt;br /&gt;
WHEN MATCHED THEN&lt;br /&gt;
UPDATE SET new.name = old.name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;WHEN NOT MATCHED THEN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;INSERT VALUES(old.ID, old.name)&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/2354478531402710271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-merge.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/2354478531402710271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/2354478531402710271'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-merge.html' title='How to use SQL MERGE?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-520504163318089193</id><published>2010-08-17T03:20:00.000-07:00</published><updated>2010-08-25T03:47:04.115-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Constraints"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle PRIMARY KEY"/><title type='text'>How to enable or disable Constraints?</title><content type='html'>&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Enable/disable primary key StudentsPrimaryKey on students table.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;ALTER TABLE students ENABLE&amp;nbsp; CONSTRAINT StudentsPrimaryKey&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;ALTER TABLE students DISABLE CONSTRAINT StudentsPrimaryKey&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/520504163318089193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-enable-or-disable-constraints.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/520504163318089193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/520504163318089193'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-enable-or-disable-constraints.html' title='How to enable or disable Constraints?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-3005620644207246230</id><published>2010-08-17T02:38:00.000-07:00</published><updated>2010-08-25T03:46:46.109-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Constraints"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle PRIMARY KEY"/><title type='text'>How to add primary key to a table?</title><content type='html'>&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Add primary key to students table on ID column.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;ALTER TABLE students ADD CONSTRAINT &quot;StudentsPrimaryKe&quot; PRIMARY KEY (ID) &lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/3005620644207246230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-add-primary-key-to-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/3005620644207246230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/3005620644207246230'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-add-primary-key-to-table.html' title='How to add primary key to a table?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-695623039314678786</id><published>2010-08-17T02:12:00.000-07:00</published><updated>2010-08-17T02:13:22.464-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle naming"/><title type='text'>How to name Oracle objects?</title><content type='html'>Oracle objects can be named according to the below rules:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Object name must start with a letter.&lt;/li&gt;
&lt;li&gt; There may be use of #, _, $, [0-9], [a-z], [A-Z] in the name&lt;/li&gt;
&lt;li&gt;Oracle reserved keywords can not be used as name &lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/695623039314678786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-name-oracle-objects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/695623039314678786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/695623039314678786'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-name-oracle-objects.html' title='How to name Oracle objects?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-392825729674546883</id><published>2010-08-17T01:00:00.000-07:00</published><updated>2010-08-17T01:00:30.029-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL ROWID"/><title type='text'>How to use SQL ROWID?</title><content type='html'>ROWID is a hexadecimal string that is unique for each row in a table.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Get ROWID and name of students.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;SELECT ROWID, name FROM students&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;background-color: #38761d; color: #009900;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Output:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;htmldbMinReport&quot; summary=&quot;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th&gt;ROWID&lt;/th&gt;&lt;th&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/th&gt;&lt;th&gt;NAME&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AAADa6AAEAAAAFFAAA&lt;/td&gt;&lt;td&gt;    &lt;/td&gt;&lt;td&gt;John&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AAADa6AAEAAAAFHAAA&lt;/td&gt;&lt;td&gt;    &lt;/td&gt;&lt;td&gt;Kamil&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AAADa6AAEAAAAFHAAB&lt;/td&gt;&lt;td&gt;    &lt;/td&gt;&lt;td&gt;David&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AAADa6AAEAAAAFHAAC&lt;/td&gt;&lt;td&gt;    &lt;/td&gt;&lt;td&gt;Fad&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AAADa6AAEAAAAFHAAD&lt;/td&gt;&lt;td&gt;    &lt;/td&gt;&lt;td&gt;Sam&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AAADa6AAEAAAAFHAAE&lt;/td&gt;&lt;td&gt;    &lt;/td&gt;&lt;td&gt;Dawn&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AAADa6AAEAAAAFHAAF&lt;/td&gt;&lt;td&gt;    &lt;/td&gt;&lt;td&gt;Emre&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AAADa6AAEAAAAFHAAG&lt;/td&gt;&lt;td&gt;    &lt;/td&gt;&lt;td&gt;Arif&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AAADa6AAEAAAAFHAAH&lt;/td&gt;&lt;td&gt;    &lt;/td&gt;&lt;td&gt;Sad&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AAADa6AAEAAAAFIAAA&lt;/td&gt;&lt;td&gt;    &lt;/td&gt;&lt;td&gt;Zeynal&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/392825729674546883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-rowid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/392825729674546883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/392825729674546883'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-rowid.html' title='How to use SQL ROWID?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-2049561634076208547</id><published>2010-08-17T00:09:00.000-07:00</published><updated>2010-08-17T05:52:13.155-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL DELETE"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL DROP"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL TRUNCATE"/><title type='text'>How to use SQL DELETE, TRUNCATE, DROP?</title><content type='html'>&lt;b&gt;DELETE:&lt;/b&gt; remove specified rows from a table. You can delete all rows by not writing WHERE statement. It can be undo by ROLLBACK.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;DELETE FROM students WHERE studentID IN (10, 20, 30);&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;TRUNCATE:&lt;/b&gt; remove all rows from a table. It can not be undo by ROLLBACK.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;TRUNCATE TABLE students;&lt;/span&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;DROP:&lt;/b&gt; remove table, all indexes and grants over that table. It can not be undo by ROLLBACK.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;DROP TABLE students;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/2049561634076208547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-delete-truncate-drop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/2049561634076208547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/2049561634076208547'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-delete-truncate-drop.html' title='How to use SQL DELETE, TRUNCATE, DROP?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-4120241731395808097</id><published>2010-08-16T23:14:00.001-07:00</published><updated>2010-08-16T23:53:02.811-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL ALTER TABLE"/><title type='text'>How to use SQL ALTER TABLE?</title><content type='html'>We can use ALTER TABLE keyword in order to do several changes on an existing table.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Add a column&lt;/li&gt;
&lt;li&gt;Rename a table&lt;/li&gt;
&lt;li&gt; Add / Drop / Rename / Modify a column&lt;/li&gt;
&lt;li&gt;Add / Drop / Enable / Disable a constraint&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/4120241731395808097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-alter-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/4120241731395808097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/4120241731395808097'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-alter-table.html' title='How to use SQL ALTER TABLE?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-927049948823598899</id><published>2010-08-15T23:24:00.000-07:00</published><updated>2010-08-15T23:24:32.325-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL ALL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL ANY"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL SOME"/><title type='text'>How to use SQL ANY, SOME, ALL?</title><content type='html'>ANY, SOME, ALL keywords are used at WHERE part of SQL statements to compare values with set of values.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Get list of students had got grade more than 50 or 70.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;SELECT name, grade FROM students WHERE grade &amp;gt; ANY(50, 70)&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SELECT name, grade FROM students WHERE grade &amp;gt; SOME(50, 70)&lt;/span&gt;&lt;/span&gt;; &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;&lt;/span&gt;Get list of students had got grade more than both 50 and 70.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;SELECT name, grade FROM students WHERE grade &amp;gt; ALL(50, 70)&lt;/span&gt;&lt;/span&gt;;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/927049948823598899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-any-some-all.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/927049948823598899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/927049948823598899'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-any-some-all.html' title='How to use SQL ANY, SOME, ALL?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-5636660162799390886</id><published>2010-08-12T03:27:00.000-07:00</published><updated>2010-08-25T03:20:07.242-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PL/SQL TRIM"/><title type='text'>How to use PL/SQL TRIM?</title><content type='html'>TRIM(&#39;CharacterToBeTrimed&#39;, &#39;StringToBeTrimed&#39;) function cleans entered character from front and end of supplied string.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Clean &#39;A&#39; characters from front and of names of students &lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;SELECT TRIM(&#39;A&#39; FROM name) FROM students&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/5636660162799390886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-plsql-trim.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/5636660162799390886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/5636660162799390886'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-plsql-trim.html' title='How to use PL/SQL TRIM?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-3841175918108888846</id><published>2010-08-11T00:17:00.000-07:00</published><updated>2010-08-11T00:39:46.848-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PL/SQL CASE"/><category scheme="http://www.blogger.com/atom/ns#" term="PL/SQL NVL"/><title type='text'>How to use PL/SQL NVL?</title><content type='html'>NVL function is used to handle NULL values in a column.&lt;br /&gt;
&lt;br /&gt;
NVL(columnName, valueIfColumnValueIsNotNull)&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Get student list with studentName, examGrade (if it is null put 50 instead)&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;SELECT studentName, NVL(examGrade, 50) FROM studentGrades&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;Note:&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;An other way without NVL is to use CASE:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SELECT CASE WHEN &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;examGrade&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; IS NULL THEN 50 ELSE &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;examGrade&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; END FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; studentGrades&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/3841175918108888846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-plsql-nvl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/3841175918108888846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/3841175918108888846'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-plsql-nvl.html' title='How to use PL/SQL NVL?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-253802682785315436</id><published>2010-08-05T22:31:00.000-07:00</published><updated>2010-08-05T22:31:45.675-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle DUAL table"/><title type='text'>What is DUAL table for?</title><content type='html'>DUAL is dummy table with 1 column (DUMMY - varchar2(1) - nullable) and 1 row &#39;X&#39;&lt;br /&gt;
&lt;br /&gt;
Test below queries to see details.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #073763;&quot;&gt;&lt;b&gt;SELECT * FROM DUAL&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #073763;&quot;&gt;&lt;b&gt;DESCRIBE DUAL &lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/253802682785315436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/what-is-dual-table-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/253802682785315436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/253802682785315436'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/what-is-dual-table-for.html' title='What is DUAL table for?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-7681702001918504268</id><published>2010-08-05T21:43:00.000-07:00</published><updated>2010-08-23T23:32:18.697-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Constraints"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle SQL*Plus"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Synonyms"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Transactions"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL COMMIT"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL ROLLBACK"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Subqueries"/><title type='text'>Oracle tips?</title><content type='html'>&lt;ul&gt;&lt;li style=&quot;color: black;&quot;&gt;When you successfully exit SQL*Plus, execute one of DDL, DCL statements (even if they fail) or use ROLLBACK TO SAVEPOINT X there will occure implicit COMMIT for the open transaction.&lt;/li&gt;
&lt;li style=&quot;color: black;&quot;&gt;When there is system crash there will occur automatic commit. &lt;/li&gt;
&lt;li style=&quot;color: black;&quot;&gt;Subqueries are processed from most inner one to the most outer one.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;If we create a synonym for an object in a schema, any user granted on this object can also access this object by using synonym for that object.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;If we modify default value of an existing column on a table, default value will be used for inserts after that point, rows those have been added before with NULL value on the column will not be change.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;Constraints can be added at creation time of tables and also after creation. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/7681702001918504268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/oracle-tips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/7681702001918504268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/7681702001918504268'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/oracle-tips.html' title='Oracle tips?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-7520256830253840688</id><published>2010-08-05T21:31:00.000-07:00</published><updated>2010-08-05T21:31:09.513-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL JOINs"/><title type='text'>How to use SQL JOIN?</title><content type='html'>JOINs bind 2 or more tables according to specified columns.&lt;br /&gt;
&lt;br /&gt;
Types of joins:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Equijoins&lt;/li&gt;
&lt;li&gt; Outer joins: FULL OUTER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, +&lt;/li&gt;
&lt;li&gt;Inner joins&lt;/li&gt;
&lt;li&gt;Self joins (recursive joins)&lt;/li&gt;
&lt;li&gt;Hierarchical joins: START WITH ... CONNECT BY PRIOR&lt;/li&gt;
&lt;li&gt;Natural joins&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/7520256830253840688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-join.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/7520256830253840688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/7520256830253840688'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-join.html' title='How to use SQL JOIN?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3194838094034727792.post-7449389396218699074</id><published>2010-08-03T02:52:00.000-07:00</published><updated>2010-08-11T00:40:08.034-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PL/SQL CASE"/><title type='text'>How to use PL/SQL CASE?</title><content type='html'>CASE expression look like switch statements as in programming languages.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;Example:&lt;/span&gt; Categorize students according to their exam grades.&lt;span style=&quot;color: #333399;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;SELECT&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;studentName,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;CASE&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;WHEN studentGrade &amp;lt; 50 THEN &#39;Weak&#39;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;WHEN &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;studentGrade &amp;lt; 90 THEN &#39;Good&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;WHEN studentGrade &amp;lt; 100 THEN &#39;Well&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;END&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; FROM studentGrades &lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://youoracle.blogspot.com/feeds/7449389396218699074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-case.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/7449389396218699074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3194838094034727792/posts/default/7449389396218699074'/><link rel='alternate' type='text/html' href='http://youoracle.blogspot.com/2010/08/how-to-use-sql-case.html' title='How to use PL/SQL CASE?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>