<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Freshers Times &#187; SQL</title>
	<atom:link href="http://www.fresherstimes.com/category/tutorial/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fresherstimes.com</link>
	<description>Freshers Jobs n Entry Level Careers in India</description>
	<lastBuildDate>Tue, 25 May 2010 16:41:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SQL Language History, Components &amp; Elements</title>
		<link>http://www.fresherstimes.com/tutorial/sql/sql-language-history-components-elements/</link>
		<comments>http://www.fresherstimes.com/tutorial/sql/sql-language-history-components-elements/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 18:55:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[History of SQL language]]></category>
		<category><![CDATA[SQL Language Components]]></category>
		<category><![CDATA[SQL Language Elements]]></category>

		<guid isPermaLink="false">http://www.fresherstimes.com/?p=6571</guid>
		<description><![CDATA[Definition of SQL Language:
SQL is a computer/programming language which enables a user or any application to interact with an SQL capable database management systems or DBMS. SQL is a great tool to deal with databases. It is used to access and manipulate databases &#38; It is very easy to implement.
In this tutorial, we will explain [...]]]></description>
			<content:encoded><![CDATA[<h2 style="text-align: justify;"><strong>Definition of SQL Language:</strong></h2>
<p style="text-align: justify;">SQL is a <span id="IL_AD3">computer/programming language</span> which enables a user or any application to interact with an SQL capable database management systems or DBMS. SQL is a great tool to deal with databases. It is used to access and manipulate databases &amp; It is very easy to implement.</p>
<p style="text-align: justify;">In this tutorial, we will explain about the basics of SQL language, its history and its implementations.</p>
<blockquote style="text-align: justify;"><p><em><strong>SQL stands for Structured Query Language.</strong></em></p></blockquote>
<p style="text-align: justify;">It is an ANSI (American National Standards Institute) standard language used for accessing and manipulating databases.</p>
<p style="text-align: justify;">There are different databases, such as, MySQL, SQL Server, Access, Oracle, Sybase, DB2, and other database systems. We will basically deal with Oracle.<span id="more-6571"></span></p>
<h2 style="text-align: justify;"><strong>Uses of SQL:</strong></h2>
<p style="text-align: justify;">SQL is a very useful language. It can be used for:</p>
<ul style="text-align: justify;">
<li> It is used to insert records in a database.</li>
<li>It is used to update records in a database.</li>
<li>It is used to execute queries against a database.</li>
<li>It is used to retrieve data from a database.</li>
<li>It is used to delete records from a database.</li>
<li>It can create new database.</li>
<li>It can create new tables in a database.</li>
<li>It can be used to create views in a database.</li>
</ul>
<h2 style="text-align: justify;"><strong>History of SQL:</strong></h2>
<p style="text-align: justify;">Before moving on its implementations, let us see the history of SQL.</p>
<p style="text-align: justify;">IBM developed the original version of SQL at its San Jose Research Laboratory (presently known as Almaden Research Center).</p>
<ol style="text-align: justify;">
<li> In 1970s, IBM implemented the language, originally called Sequel, as a part of the system R project.</li>
<li>Later on, in 1974, the name of Sequel changed to SQL (Structured Query Language).</li>
<li>In 1986, the American National Standards Institute (ANSI) and the International Organization for Standardization (ISO) published in SQL standard, called SQL-86.</li>
<li>In 1987, IBM published its own corporate SQL standard, the System Application Architecture Database Interface (SAA-SQL).</li>
<li>ANSI published an extended standard for SQL, called SQL-89, in 1989.</li>
</ol>
<h2 style="text-align: justify;">Components / Parts of SQL Language:</h2>
<ul style="text-align: justify;">
<li> <strong>Data Definition Language (DDL):</strong> DDL is used for defining relational schemas, deleting relations, and modifying relational schemas.</li>
<li> <strong>Data Manipulation Language (DML):</strong> It includes query language. It also includes commands to insert tuples , delete tuples and modify tuples in the database.</li>
<li><strong>Transaction Control:</strong> SQL includes commands for specifying the beginning and ending of transactions.</li>
</ul>
<h3 style="text-align: justify;">Elements of an SQL Language:</h3>
<p style="text-align: justify;">The SQL language is sub-divided into several language elements, including:</p>
<ul style="text-align: justify;">
<li> Clauses</li>
<li>Expressions</li>
<li> Predicates</li>
<li> Queries</li>
<li> Statements</li>
</ul>
<h3 style="text-align: justify;">Chart to illustrate SQL Elements:</h3>
<p style="text-align: justify;"><a href="http://www.fresherstimes.com/wp-content/uploads/2009/12/sql-language.png"><img class="alignnone size-full wp-image-6575" title="sql-language" src="http://www.fresherstimes.com/wp-content/uploads/2009/12/sql-language.png" alt="sql-language" width="439" height="115" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fresherstimes.com/tutorial/sql/sql-language-history-components-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Sequences</title>
		<link>http://www.fresherstimes.com/tutorial/sql/sql-sequences/</link>
		<comments>http://www.fresherstimes.com/tutorial/sql/sql-sequences/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 13:16:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sequence in Oracle]]></category>
		<category><![CDATA[sql sequence example]]></category>
		<category><![CDATA[SQL Sequence Syntax]]></category>
		<category><![CDATA[sql sequence tutorial]]></category>

		<guid isPermaLink="false">http://www.fresherstimes.com/?p=6398</guid>
		<description><![CDATA[SQL Sequences Tutorial, Examples, Oracle Syntax, Nextval, Currval]]></description>
			<content:encoded><![CDATA[<h2>SQL Sequences Introduction:</h2>
<p style="text-align: justify;">The use of sequence is very important in Oracle. A sequence is a database item that generates a <strong><em>sequence of integers</em></strong>. It is a set of integers that are used to create a unique number to act as a primary key.</p>
<h4 style="text-align: justify;">Sytax of an Oracle Sequence</h4>
<p>The syntax for a sequence is:</p>
<blockquote><p>CREATE SEQUENCE sequence_name<br />
MINVALUE value<br />
MAXVALUE value<br />
START WITH value<br />
INCREMENT BY value<br />
CACHE value;</p></blockquote>
<h3>SQL Sequence Example:<span id="more-6398"></span></h3>
<p style="text-align: justify;">Let us consider a simple example. Suppose we want to create a sequence object called “s”, it starts with 1, the minimum and maximum values are 1 and 100 respectively, it is incremented by 1 and will cache up to 20 values. Then the following command will be used:</p>
<blockquote><p>CREATE SEQUENCE s_seq<br />
MINVALUE 1<br />
MAXVALUE 100<br />
START WITH 1<br />
INCREMENT BY 1<br />
CACHE 20;</p></blockquote>
<p style="text-align: justify;">The default value of MAXVALUE option is 999999999999999999999999999. It is the maximum value up to which it is used.</p>
<h3>NEXTVAL Operator:</h3>
<p style="text-align: justify;">Nextval Operator is used to retrieve the next value in the sequence order.</p>
<p>The general way to use this command is as follows:</p>
<blockquote><p>s.NEXTVAL</p></blockquote>
<p>where “s” is the sequence object.</p>
<p>This would retrieve the next value from “s”.</p>
<h3>CURRVAL Operator:</h3>
<p style="text-align: justify;">Currval Operator is used to retrieve the current value in the sequence order.</p>
<p>The general way to use this command is as follows:</p>
<blockquote><p>s.CURRVAL</p></blockquote>
<p>where “s” is the sequence object.</p>
<p>This would retrieve the current value from “s”.</p>
<h3>INSERT Statement &amp; Sequences:</h3>
<p>Insert statement is used to insert values in the table.</p>
<p>Let us understand this with a simple example:</p>
<blockquote><p>INSERT INTO s<br />
(s1_id, s1_name)<br />
VALUES<br />
(s.NEXTVAL, &#8216;hello student&#8217;);</p></blockquote>
<p style="text-align: justify;">The insert statement would insert a new record into the “s” table. The s1_id field would be assigned the next number from the “s” sequence. The s1_name field would be set to ‘hello student’.</p>
<p>Let us take few more examples:</p>
<ul>
<li>
<h4>Creating a sequence “ t ”</h4>
</li>
</ul>
<blockquote><p>CREATE SEQUENCE t<br />
START WITH 10<br />
INCREMENT BY 5<br />
MINVALUE 10<br />
MAXVALUE 20<br />
CYCLE CACHE 2 ORDER ;</p></blockquote>
<p>Sequence created.</p>
<ul>
<li>
<h4>Creating a sequence “ d ” start with 50 increment by 10</h4>
</li>
</ul>
<blockquote><p>CREATE SEQUENCE d<br />
START WITH 50<br />
INCREMENT BY 10 ;</p></blockquote>
<p>Sequence created.</p>
<h3>SELECT statement &amp; Sequences:</h3>
<p>Select command is used to select a data from a database and then display it.</p>
<p><span style="text-decoration: underline;">Syntax:</span></p>
<blockquote><p>SELECT column name<br />
FROM table name;</p></blockquote>
<p>Let us take an example:</p>
<blockquote><p>SELECT d.nextval<br />
FROM dhr;</p></blockquote>
<p>Output will be as follows:</p>
<blockquote><p>NEXTVAL<br />
&#8212;&#8212;&#8212;-<br />
50</p></blockquote>
<h3>DROP a Sequence:</h3>
<p>A drop statement is used for deleting a sequence. If the sequence is deleted, it will not be restored again.</p>
<p><span style="text-decoration: underline;">Syntax:</span></p>
<blockquote><p>DROP SEQUENCE name;</p></blockquote>
<p>For example:</p>
<blockquote><p>DROP SEQUENCE t;</p></blockquote>
<p>Sequence dropped.</p>
<p><strong>Note: </strong>The sequence “ t ” is dropped and will not be restored again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fresherstimes.com/tutorial/sql/sql-sequences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

