<?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: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-3729554492741225349</id><updated>2011-07-29T00:11:05.114-07:00</updated><category term='complete oracle blog'/><category term='oracle guide'/><category term='oracle blog'/><category term='complete oracle guide'/><title type='text'>Complete Oracle Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://completeoracleblog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3729554492741225349/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://completeoracleblog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Leela Narasimha Reddy</name><uri>http://www.blogger.com/profile/17558152068440580391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_UUINMEQNVMc/SUZLTz-lv1I/AAAAAAAAAA0/7npplR4nkp4/S220/my+bike.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3729554492741225349.post-8492277466737059051</id><published>2010-01-25T03:41:00.000-08:00</published><updated>2010-01-25T03:42:21.973-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oracle guide'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle blog'/><category scheme='http://www.blogger.com/atom/ns#' term='complete oracle guide'/><category scheme='http://www.blogger.com/atom/ns#' term='complete oracle blog'/><title type='text'>Short Introduction On SQL Programing</title><content type='html'>Here is a short intro on SQL programming in &lt;b&gt;&lt;a href="http://completeoracleblog.blogspot.com/"&gt;Oracle Blog&lt;/a&gt;&lt;/b&gt;, mostly for newbies, and with a few useful links if you are new to SQL programming.&lt;br /&gt;&lt;br /&gt;Before continuing, Here is a a little background: There have been disputes for many years about the pronounciation of the letters SQL: Should it be pronounced S-Q-L or sequel?&lt;br /&gt;&lt;br /&gt;The word sequel stands for Structured English QUEry Language, after an IBM project way back in time. Later, during the definition process of relational databases and a standard language for them, the term came to be Structured Query Language, SQL.&lt;br /&gt;&lt;br /&gt;However, a product like Microsoft SQL Server is pronounced 'sequel Server'.&lt;br /&gt;&lt;br /&gt;Here are a few basics on SQL programming:&lt;br /&gt;&lt;br /&gt;SQL language is mainly divided into two sections:&lt;br /&gt;&lt;br /&gt;DDL(Data Definition Language): DDL is used to create and maintain database objects such as tables, indexes, constraints and any other elements that together form the database structure for a given system.&lt;br /&gt;&lt;br /&gt;DML(Data Manipulation Language): DML is used to create and maintain the data we want in our database tables.&lt;br /&gt;&lt;br /&gt;DMl section has mainly four commands:&lt;br /&gt;&lt;br /&gt;INSERT: To add new row(s) in a table.&lt;br /&gt;UPDATE: To change existing row(s) in a table.&lt;br /&gt;DELETE: To remove row(s) in a table.&lt;br /&gt;SELECT: To retrieve one or more rows from one or more tables.&lt;br /&gt;&lt;br /&gt;Most likely, the SELECT statement is the most used of these. It is also called as Dtat Retrieval Command&lt;br /&gt;&lt;br /&gt;The most important feature of SQL programming is that it is set oriented.&lt;br /&gt;&lt;br /&gt;Set Oriented means that one statement can work on many rows in one operation. A very big difference from traditional and procedural languages.&lt;br /&gt;&lt;br /&gt;Consider this example:&lt;br /&gt;&lt;br /&gt;UPDATE EMPLOYEE&lt;br /&gt;SET SALARY = SALARY * 1.1;&lt;br /&gt;&lt;br /&gt;Every employee in the EMPLOYEE table get a 10% pay rise. Very nice.&lt;br /&gt;&lt;br /&gt;Another example:&lt;br /&gt;&lt;br /&gt;DELETE FROM EMPLOYEE;&lt;br /&gt;&lt;br /&gt;All employees are removed... Not so nice.&lt;br /&gt;&lt;br /&gt;You can reduce the damage by using restriction, or conditions:&lt;br /&gt;&lt;br /&gt;DELETE FROM EMPLOYEE&lt;br /&gt;WHERE DEPT_NO=10;&lt;br /&gt;&lt;br /&gt;Now, only the employees of department no. 10 are removed.&lt;br /&gt;&lt;br /&gt;However, it is difficult to use conditional programming in SQL (IF/THEN/ELSE). Because of this, the definition and use of ref cursors have emerged. This is a mechanism that allows you to step through a result set one row at a time. For a broader description on how to define it, you can read my ref cursor page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3729554492741225349-8492277466737059051?l=completeoracleblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://completeoracleblog.blogspot.com/feeds/8492277466737059051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://completeoracleblog.blogspot.com/2010/01/short-introduction-on-sql-programing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3729554492741225349/posts/default/8492277466737059051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3729554492741225349/posts/default/8492277466737059051'/><link rel='alternate' type='text/html' href='http://completeoracleblog.blogspot.com/2010/01/short-introduction-on-sql-programing.html' title='Short Introduction On SQL Programing'/><author><name>Leela Narasimha Reddy</name><uri>http://www.blogger.com/profile/17558152068440580391</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_UUINMEQNVMc/SUZLTz-lv1I/AAAAAAAAAA0/7npplR4nkp4/S220/my+bike.jpg'/></author><thr:total>0</thr:total></entry></feed>
