<?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-242256207435779424</id><updated>2012-02-16T04:37:30.313-08:00</updated><category term='ORACLE'/><category term='Common concepts'/><category term='Downloads'/><category term='Aptitude placement papers'/><category term='New Products'/><category term='News'/><category term='tips'/><category term='C-language'/><category term='Requirements'/><category term='Sql Server'/><title type='text'>Software Materials and Interviews info</title><subtitle type='html'>By Kartheek Challagundla. 9885218521</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>57</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-5636532069856544083</id><published>2008-11-15T11:10:00.000-08:00</published><updated>2010-07-02T02:21:51.239-07:00</updated><title type='text'>WELCOME</title><content type='html'>&lt;div&gt;WELCOME&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-5636532069856544083?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/5636532069856544083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=5636532069856544083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5636532069856544083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5636532069856544083'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/11/romeo-contest-canvasing.html' title='WELCOME'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-6750564316684546322</id><published>2008-09-30T06:24:00.000-07:00</published><updated>2008-09-30T06:38:36.487-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='News'/><title type='text'>Blogging Is Not A Crime</title><content type='html'>&lt;h3 class="post-title entry-title"&gt;&lt;a href="http://funandtech.blogspot.com/2008/08/blogging-is-not-crime.html"&gt;Blogging  Is Not A Crime&lt;/a&gt; &lt;/h3&gt;  &lt;div class="post-header-line-1"&gt;&lt;span class="post-timestamp"&gt;&lt;/span&gt;&lt;span class="post-comment-link"&gt;&lt;br /&gt; &lt;/span&gt;&lt;/div&gt;  &lt;div class="post-body entry-content"&gt; &lt;p&gt;&lt;a href="http://1.bp.blogspot.com/_sKuPwH0PiM0/SKKBXkgCSlI/AAAAAAAAAq0/KJIUbwd8G_A/s1600-h/bloggers-arrest.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5233887958892956242" style="margin: 0px auto 10px; display: block; text-align: center;" alt="" src="http://1.bp.blogspot.com/_sKuPwH0PiM0/SKKBXkgCSlI/AAAAAAAAAq0/KJIUbwd8G_A/s320/bloggers-arrest.png" border="0"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;I found this &lt;a onclick="javascript:pageTracker._trackPageview ('/outbound/www.swivel.com');" href="http://www.swivel.com/graphs/show/29015063"&gt;arresting chart on Swivel&lt;/a&gt;.  It plots the number of bloggers who have been incarcerated over the past few  years, based on data collected by the &lt;a onclick="javascript:pageTracker._trackPageview ('/outbound/www.wiareport.org');" href="http://www.wiareport.org/index.php/56/blogger-arrests"&gt;World Information  Access&lt;/a&gt; project. The number of incidents it tracks went from five arrests in  2003 to 35 last year. As blogging expands internationally, so do the risk of  speaking one’s mind. (Something many of us take for granted). &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Most of those arrests are in countries with oppressive regimes, such as  Egypt, China, &lt;a href="http://www.techcrunch.com/2008/01/01/saudis-arrest-top-blogger/"&gt;Saudi  Arabia&lt;/a&gt;, and Iran. But bloggers have been arrested in Canada, France, Greece,  and even the U.S. (with &lt;a onclick="javascript:pageTracker._trackPageview ('/outbound/laughingsquid.com');" href="http://laughingsquid.com/san-francisco-video-blogger-josh-wolf-arrested/"&gt;Josh  Wolf&lt;/a&gt; being one of the most famous incidents—he spent the better part of a  year in jail for refusing to turn over journalistic video footage to a grand  jury). &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;A few involve cases of alleged terrorism or pedophilia, but the  majority involve some form of political speech. Some typical examples:&lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Reza Valizadeh (Iran; November, 2007). “For revealing Iranian president’s  overpriced dogs that his security team uses.”&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Charles Leblanc (Canada; June, 2006): “For taking pictures at a conference  for his blog.”&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Josh Wolf (USA; August, 2006): “For videotaping a burning police car.”&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Hu Jia (China; December, 2007): “For posting his vocal critiques of human  rights abuses and environmental degradation in China and calling the Olympics a  ‘human rights disaster.’”&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Reza Valizadeh (Iran; November, 2007): “For revealing Iranian president’s  overpriced dogs that his security team uses.”&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Nay Phone Latt (Burma; January, 2008): “For posting pictures of monks and  people demonstrating on the streets.”&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-6750564316684546322?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/6750564316684546322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=6750564316684546322' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/6750564316684546322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/6750564316684546322'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/09/blogging-is-not-crime.html' title='Blogging Is Not A Crime'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_sKuPwH0PiM0/SKKBXkgCSlI/AAAAAAAAAq0/KJIUbwd8G_A/s72-c/bloggers-arrest.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-2129352183030909892</id><published>2008-09-27T10:11:00.001-07:00</published><updated>2008-09-27T10:15:53.576-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><title type='text'>What is Copy right</title><content type='html'>&lt;span class="Apple-style-span"   style="color: rgb(51, 51, 51);   line-height: 22px; font-family:Verdana;font-size:15px;"&gt;&lt;h1  style="color: rgb(162, 172, 11);  line-height: 27px; letter-spacing: -0.5px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 8px; margin-right: 0px; margin-bottom: 1px; margin-left: -3px; font-size:24px;"&gt;&lt;span class="Apple-style-span" style="color: rgb(101, 97, 86);"&gt;&lt;span class="Apple-style-span"  style="color: rgb(51, 51, 51);  font-weight: normal; line-height: 22px; font-size:15px;"&gt;&lt;h1 style="color: rgb(162, 172, 11); font-size: 24px; line-height: 27px; letter-spacing: -0.5px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 8px; margin-right: 0px; margin-bottom: 1px; margin-left: -3px; "&gt;&lt;span class="Apple-style-span" style="color: rgb(101, 97, 86);"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); font-size: 15px; font-weight: normal; line-height: 22px; "&gt;&lt;h1 style="color: rgb(162, 172, 11); font-size: 24px; line-height: 27px; letter-spacing: -0.5px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 8px; margin-right: 0px; margin-bottom: 1px; margin-left: -3px; "&gt;&lt;a href="http://www.techzoomin.com/copyright-issues/" rel="bookmark" style="color: rgb(101, 97, 86); text-decoration: none; border-bottom-style: none; border-bottom-width: initial; border-bottom-color: initial; "&gt;Copyright Issues&lt;/a&gt;&lt;/h1&gt;&lt;div id="data" style="margin-top: 0px; margin-right: 0px; margin-left: 0px; margin-bottom: 10px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 12px; "&gt;&lt;span class="Apple-style-span" style="font-size: 10px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;The hot topic on web always will be Copyright. What is this copyright? And why people won’t allow you to copy their content. This is my target topic today which inspired me to write this article.&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;Being online from last 2 years, I saw almost all the blogs and sites will include a copyright link mentioning not to copy their content without permission. Are they really taking the rights on that content or just warning the visitors by keeping a simple menu called Copyright. These are all unanswered questions.&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;But here, is that really necessary to take copyrights or warn users not to copy. I would say it’s not necessary as far as it’s a book or something important you are inventing into web through your blog.&lt;img class="aligncenter size-medium wp-image-352" title="Copyrights Logo" src="http://www.techzoomin.com/wp-content/uploads/2008/09/copyright-500x293.jpg" alt="" width="500" height="293" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /&gt;&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;Anyway here am not covering all about copyrights like how to take rights? What to do if anyone violates them? If you are really interested to know them visit labnol.org where Amit covered all those faqs.&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;But the conclusion from my side is until you are doing something extra which is not reproducible by others, you don’t need to take rights and warn visitors not to copy that. I don’t mind if my visitors copy content from TZI. Because from this I will get link back and intern traffic from that.&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;But the people who are copying content need to remember that copying content won’t help you anymore. Ofcourse you can take some content or idea from that article or anything limited.&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-2129352183030909892?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/2129352183030909892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=2129352183030909892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/2129352183030909892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/2129352183030909892'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/09/what-is-copy-right.html' title='What is Copy right'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-4268083707472657119</id><published>2008-09-27T10:05:00.000-07:00</published><updated>2008-09-27T10:10:36.623-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><title type='text'>Simple tips to Promote blog ourself</title><content type='html'>&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana; font-size: 15px; line-height: 22px; "&gt;&lt;h1 style="color: rgb(162, 172, 11); font-size: 24px; line-height: 27px; letter-spacing: -0.5px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 8px; margin-right: 0px; margin-bottom: 1px; margin-left: -3px; "&gt;&lt;a href="http://www.techzoomin.com/9-simple-tips-to-promote-blog-yourself/" rel="bookmark" style="color: rgb(101, 97, 86); text-decoration: none; border-bottom-style: none; border-bottom-width: initial; border-bottom-color: initial; "&gt;9 Simple tips to Promote blog yourself&lt;/a&gt;&lt;/h1&gt;&lt;h1 style="color: rgb(162, 172, 11); font-size: 24px; line-height: 27px; letter-spacing: -0.5px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 8px; margin-right: 0px; margin-bottom: 1px; margin-left: -3px; "&gt;&lt;br /&gt;&lt;/h1&gt;&lt;div id="data" style="margin-top: 0px; margin-right: 0px; margin-left: 0px; margin-bottom: 10px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 12px; "&gt;&lt;span class="Apple-style-span" style="font-size: 10px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;&lt;img class="alignright size-medium wp-image-345" title="Promote Your Blog" src="http://www.techzoomin.com/wp-content/uploads/2008/09/promoteyourblog.jpg" alt="" width="140" height="193" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; float: right; padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 2px; margin-left: 7px; display: inline; " /&gt;I am sharing some of the tips I observed in promoting Blog yourselves. Here you don’t need to ask some one to view your blog or no need to request anyone for anything. You just need to observe and use the resources around you.&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;Here are some of the sources I observed:&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;&lt;strong&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;&lt;span style="color: rgb(51, 51, 0); "&gt;1.&lt;/span&gt; Include blog URL in signatures:&lt;/span&gt;&lt;/strong&gt; This is a powerful media to drive the traffic again and again. Naturally you will send tons of mail from your inbox to friends, colleague and to many known and unknown people. So if you include URL in signature, it’s natural that people will click on your URL to know what that is. Here you need to attract them to visit again and again. For that you should have an interesting content on your blog. So just include it and receive the traffic.&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;One more important thing I forgot to say, People will forward your mail to many people in long run so your URL will travel around the web.&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;&lt;strong&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;&lt;span style="color: rgb(51, 51, 0); "&gt;2. &lt;/span&gt;Place URL in IM’s:&lt;/span&gt;&lt;/strong&gt; Do place your URL in IM’s like Gtalk, Yahoo messenger, MSN, AOL and etc….&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;&lt;strong&gt;3. &lt;span style="color: rgb(0, 128, 0); "&gt;Place it in Social Networking Profiles:&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: rgb(0, 128, 0); "&gt; &lt;/span&gt;Yes, do mention URL in profiles of social networking site like Orkut, Facebook, Hi5, MySpace and etc…&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;&lt;strong&gt;4. &lt;span style="color: rgb(0, 128, 0); "&gt;Submit to Search Engines:&lt;/span&gt;&lt;/strong&gt; Don’t forget to submit your blog to &lt;span class="bm_keywordlink"&gt;&lt;a href="http://www.techzoomin.com/submitting-your-blog-to-search-engines/" target="_blank" style="color: rgb(153, 51, 51); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); "&gt;search engines&lt;/a&gt;&lt;/span&gt; like Google, Yahoo, Live, Cuil and etc…&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;&lt;strong&gt;5. &lt;span style="color: rgb(0, 128, 0); "&gt;Submit to Social Bookmarking Sites:&lt;/span&gt; &lt;/strong&gt;&lt;span class="bm_keywordlink"&gt;&lt;a href="http://www.techzoomin.com/promoting-your-blog/" target="_blank" style="color: rgb(153, 51, 51); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); "&gt;Promote&lt;/a&gt;&lt;/span&gt; your content on Social Bookmarking Sites like Digg.com, Reddit.com, StumbleUpon.com, Del.icio.us and etc…&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;&lt;strong&gt;6. &lt;span style="color: rgb(0, 128, 0); "&gt;Share links with other Bloggers:&lt;/span&gt; &lt;/strong&gt;This is really a powerful trick to drive traffic in the initial stages of your blog. Do share links with Blogs under your niche.&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;&lt;strong&gt;7. &lt;span style="color: rgb(0, 128, 0); "&gt;Place feed headlines in your other Blogs:&lt;/span&gt;&lt;/strong&gt; If you own multiple blogs, it’s always good to place feed headlines from Feedburner on your blogs. And also place a section called my blogs or my network to let visitors know that you own more that one blog.&lt;br /&gt;&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;&lt;strong&gt;8. &lt;span style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 153, 0);"&gt; Comments on fellow blogs&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;: &lt;/span&gt;&lt;/strong&gt;This is my personal experience; Commenting on other blogs will work like anything. You will get lots of traffic starting from the owner of the blog where you commented to his visitors.&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;&lt;strong&gt;9. &lt;span style="color: rgb(0, 128, 0); "&gt;Join Blog directories:&lt;/span&gt;&lt;/strong&gt; Now-a-days every Country or City has its own blogging communities maintaining a list of Bloggers from that region or language or etc… By joining in those will drive traffic from your own region or Country.&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;Did I miss anything? OR Any other you know?&lt;/p&gt;&lt;p style="padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 22px; "&gt;Please share your tips here!&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-4268083707472657119?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/4268083707472657119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=4268083707472657119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4268083707472657119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4268083707472657119'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/09/simple-tips-to-promote-blog-ourself.html' title='Simple tips to Promote blog ourself'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-3515710323710658273</id><published>2008-09-26T10:59:00.000-07:00</published><updated>2008-09-26T11:09:30.979-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='New Products'/><title type='text'>Google Phone</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wEXVBmU8lj8/SN0k6Y7Wa0I/AAAAAAAAAB8/QpsyANbrplY/s1600-h/fresh_google_phone.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_wEXVBmU8lj8/SN0k6Y7Wa0I/AAAAAAAAAB8/QpsyANbrplY/s320/fresh_google_phone.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5250393326126263106" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;FEATURES of GOOGLE PHONE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Touch screen&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Instant access to key information with the touch of a finger&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Just tap the screen and go&lt;/div&gt;&lt;div&gt;Google G1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Real Web browsing capabilities&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Quick and easy access to the Internet one click away&lt;br /&gt;&lt;/div&gt;&lt;div&gt;View more pages and rich Web content on your phone&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;3MP camera&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Capture key moments in high-quality fashion wherever you are&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Never worry about blurry photos with auto focus built right in&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Customizable home screen&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Just drag and drop any of your favorite applications, photos, or folders onto your home screen for quick access to what you use all the time&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;One-click Google Search&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Quick and easy access to the Internet in one click&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Video playback&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Watch your favorite videos, even YouTube, anywhere&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Google G1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;3G network and Wi-Fi access*&lt;/span&gt;&lt;/div&gt;&lt;div&gt;High-speed 3G network connection for surfing the Web or downloading information quickly and effortlessly&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Seamlessly transition to open Wi-Fi networks to surf the Web or download information quickly&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Android Market&lt;/span&gt;&lt;/div&gt;&lt;div&gt;One-touch access to Android Market&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Customize and personalize your device to fit your life with a variety of software applications like games, social networking, and on-the-go shopping&lt;/div&gt;&lt;div&gt;Download the applications wirelessly with just a couple short clicks&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;QWERTY keyboard&lt;/span&gt;&lt;/div&gt;&lt;div&gt;The built-in familiar layout lets you type messages easily without scrolling for the letter you want&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hinged screen slides open to reveal keypad and closes to prevent accidental dialing&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Easy access to Google applications&lt;/span&gt;&lt;/div&gt;&lt;div&gt;One-touch access to Google applications:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Maps (including satellite, traffic, and street views)&lt;/div&gt;&lt;div&gt;Gmail&lt;/div&gt;&lt;div&gt;YouTube&lt;/div&gt;&lt;div&gt;Calendar&lt;/div&gt;&lt;div&gt;Google Talk&lt;/div&gt;&lt;div&gt;IM/text/e-mail*&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Music player&lt;/span&gt;&lt;/div&gt;&lt;div&gt;With the 1GB memory card, you'll never be without your favorite tunes&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-3515710323710658273?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/3515710323710658273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=3515710323710658273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/3515710323710658273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/3515710323710658273'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/09/google-phone.html' title='Google Phone'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_wEXVBmU8lj8/SN0k6Y7Wa0I/AAAAAAAAAB8/QpsyANbrplY/s72-c/fresh_google_phone.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-1058069533402622739</id><published>2008-09-15T19:08:00.000-07:00</published><updated>2008-09-15T19:19:52.160-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='News'/><title type='text'>Aliens are there</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;DO u believe &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 153, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;ALIEN'S&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;...........????&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;IF not see the below pictures&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;These are the original pictures.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0); font-size: 18px; font-weight: bold;"&gt;These are seen but the government hiding the truth.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wEXVBmU8lj8/SM8WLvK3twI/AAAAAAAAABk/IqCoOexoLD4/s1600-h/dead_alien_picture_2.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_wEXVBmU8lj8/SM8WLvK3twI/AAAAAAAAABk/IqCoOexoLD4/s320/dead_alien_picture_2.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5246436481806350082" /&gt;           &lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 102, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wEXVBmU8lj8/SM8WLvK3twI/AAAAAAAAABk/IqCoOexoLD4/s1600-h/dead_alien_picture_2.jpg"&gt;Alien Image 1&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 102, 0); font-size: 18px; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_wEXVBmU8lj8/SM8WLzAMnqI/AAAAAAAAABs/OJcCvb0C60E/s1600-h/real_alien_pic.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_wEXVBmU8lj8/SM8WLzAMnqI/AAAAAAAAABs/OJcCvb0C60E/s320/real_alien_pic.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5246436482835324578" /&gt;               &lt;/a&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 102, 0); font-size: 18px; font-weight: bold; "&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wEXVBmU8lj8/SM8WLvK3twI/AAAAAAAAABk/IqCoOexoLD4/s1600-h/dead_alien_picture_2.jpg"&gt;Alien Image 2&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 102, 0); font-size: 18px; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wEXVBmU8lj8/SM8WLxTqJsI/AAAAAAAAAB0/rGikgZUJBW0/s1600-h/real_ufo_picture.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_wEXVBmU8lj8/SM8WLxTqJsI/AAAAAAAAAB0/rGikgZUJBW0/s320/real_ufo_picture.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5246436482380080834" /&gt;                &lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wEXVBmU8lj8/SM8WLvK3twI/AAAAAAAAABk/IqCoOexoLD4/s1600-h/dead_alien_picture_2.jpg"&gt;&lt;span class="Apple-style-span" style="font-size: 18px; font-weight: bold;"&gt;UFO :used by aliens to travel&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-1058069533402622739?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/1058069533402622739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=1058069533402622739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1058069533402622739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1058069533402622739'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/09/aliens-are-there.html' title='Aliens are there'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_wEXVBmU8lj8/SM8WLvK3twI/AAAAAAAAABk/IqCoOexoLD4/s72-c/dead_alien_picture_2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-3101893130448016468</id><published>2008-09-15T10:55:00.000-07:00</published><updated>2008-09-15T11:04:48.558-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><title type='text'>Billion million in digit format</title><content type='html'>&lt;strong&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff6600;"&gt;Million:&lt;/span&gt; 1,000,000&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff6600;"&gt;Billion:&lt;/span&gt; 1,000,000,000&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff6600;"&gt;Trillion:&lt;/span&gt; 1,000,000,000,000&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff6600;"&gt;Quintillion:&lt;/span&gt; 1,000,000,000,000,000,000&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff6600;"&gt;Sextillion:&lt;/span&gt; 1,000,000,000,000,000,000,000&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff6600;"&gt;Nonillion:&lt;/span&gt; 1,000,000,000,000,000,000,000,000,000,000 &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff6600;"&gt;Centillion:&lt;/span&gt; 1 followed by 303 zeros&lt;/span&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-3101893130448016468?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/3101893130448016468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=3101893130448016468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/3101893130448016468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/3101893130448016468'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/09/billion-million-in-digit-format.html' title='Billion million in digit format'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-4855635865236783308</id><published>2008-09-15T10:04:00.001-07:00</published><updated>2008-09-15T10:06:32.660-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><title type='text'>Do you want to earn money through websites?</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;strong&gt;&lt;span style="color:#ff6600;"&gt;Do you want to earn money through websites?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#33cc00;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color:#33cc00;"&gt;How to Create a Website and Earn Money&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Here I am going to discuss about how easy it is to generate money by just sitting in front of your PCs and laptops. All you need to do is buy a web space online or use any free services provided by a number of vendors.&lt;a name="Steps"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Steps&lt;br /&gt;These days a lot of revenue is being generated by the online advertising. It is not that a small number that one can ignore.&lt;br /&gt;Most of the popular search engines are making billions of dollars by online marketing and advertising.&lt;br /&gt;This is one of the quickest and easiest way to earn money.&lt;br /&gt;For this all you need to do is buy a web space and start creating a website or use free service provided by many vendors online.&lt;br /&gt;In the first case you can get a most appropriate URL (a link to your website) with a .com extension.&lt;br /&gt;In the second case you need to settle with some of the names that the vendor will provide with a very long tail attached with the URL before the .com&lt;br /&gt;If your URL is big then people may not remember you website that easily. But, if you want something free you need to compromise certain things.&lt;br /&gt;Once you decide which way is better then you can go ahead and build a website.&lt;br /&gt;If you are looking for a free web space then you can use google blogger, yahoo blogger, wordpress etc., they will provide you with free web space as well as give you some basic templates which you can use to create a website.&lt;br /&gt;You can find a lot of people now a days using the blogger services and earning very good money.&lt;br /&gt;For using these free services you should create an account with them and they will provide you with some basic templates that are installed in their web servers.&lt;br /&gt;Also, if you don't like their templates you can create a template of your own and upload it to their server.&lt;br /&gt;Once you have the template of your choice, you can go ahead and create your first post.&lt;br /&gt;Keep posting regularly on your web site and then increase traffic to your page.&lt;br /&gt;Now that you have a good number of people reading your blog (otherwise called web traffic) you can also place free ads on your web site which will earn you money.&lt;br /&gt;So, start creating your website today and earn money.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-4855635865236783308?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/4855635865236783308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=4855635865236783308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4855635865236783308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4855635865236783308'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/09/do-you-want-to-earn-money-through.html' title='Do you want to earn money through websites?'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-853560262133906445</id><published>2008-09-15T07:32:00.000-07:00</published><updated>2008-09-15T10:10:49.264-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><title type='text'>Antivirus for free : Avast</title><content type='html'>&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;#####&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;One of the most secured antivirus Avast &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;providing &lt;span style="font-size:130%;color:#cc33cc;"&gt;anti virus for free of cost&lt;/span&gt; for home users.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;version : Avast 4.8 Home edition.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;Key: Free key for persons who registered.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;For more details visit&lt;/strong&gt; &lt;a href="http://www.avast.com/"&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;www.avast.com&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;&lt;strong&gt;Get it now.....!&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-853560262133906445?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/853560262133906445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=853560262133906445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/853560262133906445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/853560262133906445'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/09/antivirus-for-free-avast.html' title='Antivirus for free : Avast'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-1725037175877793366</id><published>2008-09-14T23:06:00.000-07:00</published><updated>2008-09-15T10:53:35.931-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='News'/><title type='text'>Hackers into BigBang</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_wEXVBmU8lj8/SM39rxqUMcI/AAAAAAAAABU/wyd-sc-qYeE/s1600-h/lch.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5246128069463519682" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_wEXVBmU8lj8/SM39rxqUMcI/AAAAAAAAABU/wyd-sc-qYeE/s320/lch.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The hackers reportedly mounted an attack on the Large Hadron Collider, which has raised eyebrows over the security of this historic experiment in the world, as it surpasses a vital milestone.&lt;br /&gt;Scientists say that it was a competition between two hacker groups - known in hacking circles as 2600 and 1337, that led them to break into the experiment just before it was to begin.&lt;br /&gt;2600, also known as the Greek Security Team broke into the experiment and left a message saying, "We are 2600.. don't mess with us..." The scientists who were behind the mammoth experiment had received threatening emails prior to the start.&lt;br /&gt;No real damage done, but the hackers got perilously close. The hackers attacked the Compact Muon Solenoid Experiment, or CMS.&lt;br /&gt;Scientists working at Cern, the organisation that runs the vast smasher, were worried about what the hackers could do because they were "one step away" from the computer control system of one of the huge detectors of the machine, a vast magnet that weighs 12,500 tons, measuring around 21 metres in length and 15 metres wide.&lt;br /&gt;If they had hacked into a second computer network, they could have turned off parts of the vast detector and, said the insider, "it is hard enough to make these things work if no one is messing with it."&lt;br /&gt;Fortunately, only one file was damaged but one of the scientists firing off emails as the CMS team fought off the hackers said it was a "scary experience". The hackers breached the CMSMON system, which monitors the CMS software system. CMS takes vast amounts of data during collisions.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-1725037175877793366?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/1725037175877793366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=1725037175877793366' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1725037175877793366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1725037175877793366'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/09/hackers-into-bigbang.html' title='Hackers into BigBang'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_wEXVBmU8lj8/SM39rxqUMcI/AAAAAAAAABU/wyd-sc-qYeE/s72-c/lch.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-8390371117627954605</id><published>2008-09-12T09:57:00.000-07:00</published><updated>2008-09-15T20:12:34.198-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='New Products'/><title type='text'>CHROME from GOOGLE</title><content type='html'>&lt;strong&gt;Google released new browser CHROME which is faster in browsing &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;and wide display area. &lt;/strong&gt;&lt;strong&gt;You can Install it from the following link.&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://www.google.com/chrome/eula.html"&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;http://www.google.com/chrome/eula.html&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-8390371117627954605?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/8390371117627954605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=8390371117627954605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/8390371117627954605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/8390371117627954605'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/09/chrome-from-google.html' title='CHROME from GOOGLE'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-8127406334251606490</id><published>2008-08-29T07:59:00.000-07:00</published><updated>2008-09-09T21:45:20.281-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='New Products'/><title type='text'>N96</title><content type='html'>&lt;span style="font-size:180%;color:#ff6600;"&gt;SaysN96 has more advantages than Iphone, may costs over 25k&lt;/span&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_wEXVBmU8lj8/SLgPOkgIxAI/AAAAAAAAAA8/9pt0_6llDsY/s1600-h/nn96.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5239954909436625922" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_wEXVBmU8lj8/SLgPOkgIxAI/AAAAAAAAAA8/9pt0_6llDsY/s320/nn96.jpg" border="0" /&gt;&lt;/a&gt; &lt;img id="BLOGGER_PHOTO_ID_5239954911287996642" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_wEXVBmU8lj8/SLgPOrZicOI/AAAAAAAAAA0/-Go76slxMAw/s320/n96.jpg" border="0" /&gt;&lt;a href="http://2.bp.blogspot.com/_wEXVBmU8lj8/SLgPO4b0r4I/AAAAAAAAABE/CbPtkqR0cQc/s1600-h/n.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5239954914787241858" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_wEXVBmU8lj8/SLgPO4b0r4I/AAAAAAAAABE/CbPtkqR0cQc/s320/n.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="font-size:180%;color:#ff6600;"&gt;&lt;/span&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-8127406334251606490?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/8127406334251606490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=8127406334251606490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/8127406334251606490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/8127406334251606490'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/n96.html' title='N96'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_wEXVBmU8lj8/SLgPOkgIxAI/AAAAAAAAAA8/9pt0_6llDsY/s72-c/nn96.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-7010895096772918962</id><published>2008-08-29T07:51:00.000-07:00</published><updated>2008-09-09T21:45:20.282-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='New Products'/><title type='text'>400 GB DVD</title><content type='html'>&lt;div&gt;&lt;strong&gt;Pioneer Released 400 GB DVD&lt;/strong&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_wEXVBmU8lj8/SLgOh1Rhy8I/AAAAAAAAAAs/uAyiJ0KC-ug/s1600-h/dvd.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5239954140844641218" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_wEXVBmU8lj8/SLgOh1Rhy8I/AAAAAAAAAAs/uAyiJ0KC-ug/s320/dvd.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.techblog.ph/wp-content/uploads/2008/07/image.png"&gt;&lt;/a&gt;&lt;br /&gt;Soon there will be a phase out of those 3.5 GB DVD that you are always using when burning DVD movies.&lt;br /&gt;Pioneer has released on what they claim as the world’s first 16-layer optical disc. With 400 GB Capacity [ An ordinary 3.5 GB DVD ) is only Single Layer.&lt;br /&gt;Right now the technology is Read Only but I do believed that soon they will release the Re-write version of this DVD. But how much will the machine to rewrite this DVD cost?&lt;br /&gt;Let us see what will happen next. Maybe I have to go back to this post after a year?&lt;br /&gt;Anyway, it is really great that Technology is advancing. Just imagine if your regular DVD could hold about 4 movies, this DVD would hold about 200 + Movies.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-7010895096772918962?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/7010895096772918962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=7010895096772918962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/7010895096772918962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/7010895096772918962'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/400-gb-dvd.html' title='400 GB DVD'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_wEXVBmU8lj8/SLgOh1Rhy8I/AAAAAAAAAAs/uAyiJ0KC-ug/s72-c/dvd.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-370729002104238270</id><published>2008-08-29T07:20:00.000-07:00</published><updated>2008-08-29T07:42:44.653-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Common concepts'/><title type='text'>VISUAL STUDIO 2008 Advantages</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Introduction&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx"&gt;Visual Studio 2008 code name "Orcas" Beta 2&lt;/a&gt; has just hit the road and, since it is Beta 2, this means Visual Studio 2008 is feature complete and is ready for RTM. Below, we would find a brief introduction of some of the new features introduced with VS 2008 and .NET 3.5 Beta 2.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;A quick list of some of the new features are:&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Multi-Targeting support&lt;br /&gt;Web Designer and CSS support&lt;br /&gt;ASP.NET AJAX and JavaScript support&lt;br /&gt;Project Designer&lt;br /&gt;Data&lt;br /&gt;LINQ – Language Integrated Query&lt;br /&gt;The features listed and explained in this paper are not complete and this document intends to give you a forehand to start off with VS 2008.&lt;br /&gt;&lt;a name="_Toc177808315"&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;1. Multi-Targeting Support&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;Earlier, each Visual Studio release only supported a specific version of the .NET Framework. For example, VS 2003 only works with .NET 1.1, and VS 2005 only works with .NET 2.0.&lt;br /&gt;One of the major changes with the VS 2008 release is to support what Microsoft calls "Multi-Targeting". This means that Visual Studio will now support targeting multiple versions of the .NET Framework, and developers will be able to take advantage of the new features that Visual Studio provides without having to migrate their existing projects and deployed applications to use a new version of the .NET Framework.&lt;br /&gt;Now when we open an existing project or create a new one with VS 2008, we can pick which version of the .NET Framework to work with. The IDE will update its compilers and feature-set to match the chosen .NET Framework.&lt;br /&gt;Features, controls, projects, item-templates, and references that do not work with the selected version of the Framework will be made unavailable or will be hidden.&lt;br /&gt;Unfortunately, support has not been included to work with Framework versions 1.1 and earlier. The present release supports 2.0/3.0 and 3.5 .NET Frameworks.&lt;br /&gt;Microsoft plans to continue multi-targeting support in all future releases of Visual Studio.&lt;br /&gt;Creating a New Project with Visual Studio 2008 that Targets .NET 2.0 Framework Library&lt;br /&gt;The screenshots below depict the creation of a new web application targeting .NET 2.0 Framework. Choose File-&gt;New Project. As we see in the snapshot below in the top-right of the new project dialog, there is now a dropdown that allows us to choose which versions of the .NET Framework we want to target when we create the new project. The templates available are filtered depending on the version of the Framework chosen from the dropdown:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Can I Upgrade an Existing Project to .NET 3.5?&lt;/strong&gt;&lt;br /&gt;When we open a solution created using an older version of Visual Studio and Framework, VS 2008 would ask if migration is required. If we opt to migrate, then a migration wizard would start. If we wish to upgrade our project to target a newer version of the Framework at a later point of time, we can pull up the project properties page and choose the Target Framework. The required assemblies are automatically referenced. The snapshot below shows the properties page with the option Target Framework marked.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;2. Web Designer, Editing and CSS Support&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;One feature that web developers will discover with VS 2008 is its drastically improved HTML designer, and the extensive CSS support made available.&lt;br /&gt;The snapshots below depict some of the new web designer features in-built into VS 2008.&lt;br /&gt;Split View Editing&lt;br /&gt;In addition to the existing views, Design view and Code view, VS 2008 brings along the Split view which allows us to view both the HTML source and the Design View at the same-time, and easily make changes in any of the views. As shown in the image below, as we select a tag in code view, the corresponding elements/controls are selected in design view.&lt;br /&gt;CSS Style Manager&lt;br /&gt;VS 2008 introduces a new tool inside the IDE called "Manage Styles". This shows all of the CSS style sheets for the page.&lt;br /&gt;It can be used when we are in any of the views - design, code and split views. Manage Styles tool can be activated by choosing Format -&gt; CSS Styles -&gt; Manage Styles from the menu. A snapshot of the same would look like the following:&lt;br /&gt;Create a new style using the new style dialog window as show in the snapshot below.&lt;br /&gt;Now, the style manager would show .labelcaption style as well in the CSS styles list. However, if we observe that the body element has a circle around it but the .labelcaption does not have one, this is because the style is not in use yet.&lt;br /&gt;We will not select all the labels below and apply our new style .labelcaption.&lt;br /&gt;We can choose to modify the existing style through GUI using "Modify style..." menu option in the dropdown menu as shown above or choose to hand edit the code by choosing the option "Go To Code".&lt;br /&gt;CSS Source View Intellisense&lt;br /&gt;The designer is equipped with the ability to select an element or control in design-view, and graphically select a rule from the CSS list to apply to it.&lt;br /&gt;We will also find when in source mode that we now have intellisense support for specifying CSS class rules. The CSS Intellisense is supported in both regular ASP.NET pages as well as when working with pages based on master pages.&lt;br /&gt;Code Editing Enhancements&lt;br /&gt;Below is a non-exhaustive list of a few new code editing improvements. There are many more about which I don't know yet.&lt;br /&gt;Transparent Intellisense Mode&lt;br /&gt;While using VS 2005/2003 we often find ourselves escaping out of intellisense in order to better see the code around, and then go back and complete what we were doing.&lt;br /&gt;VS 2008 provides a new feature which allows us to quickly make the intellisense drop-down list semi-transparent. Just hold down the "Ctrl" key while the intellisense drop-down is visible and we will be able to switch it into a transparent mode that enables us to look at the code beneath without having to escape out of Intellisense. The screenshot below depicts the same.&lt;br /&gt;Organize C# Using Statements&lt;br /&gt;One of the small, but a nice new feature in VS 2008 is support for better organizing using statements in C#. We can now select a list of using statements, right-click, and then select the "Organize Usings" sub-menu. When we use this command the IDE will analyze what types are used in the code file, and will automatically remove those namespaces that are declared but not required. A small and handy feature for code refactoring.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;3. &lt;/span&gt;&lt;/strong&gt;&lt;a name="_Toc177808314"&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;ASP.NET &lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;AJAX and JavaScript Support&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;JavaScript Intellisense&lt;br /&gt;One new feature that developers will find with VS 2008 is its built-in support for JavaScript Intellisense. This makes using JavaScript and building AJAX applications significantly easier. A double click on HTML control in design mode would automatically create a click event to the button and would create the basic skeleton of the JavaScript function. As we see in the depicted image below, JavaScript Intellisense is inbuilt now. Other JavaScript Intellisense features include Intellisense for external JavaScript libraries and adding Intellisense hints to JavaScript functions.&lt;br /&gt;JavaScript Debugging&lt;br /&gt;One new JavaScript feature in VS 2008 is the much-improved support for JavaScript debugging. This makes debugging AJAX applications significantly easier. JavaScript debugging was made available in VS 2005 itself. However, we had to run the web application first to set the breakpoint or use the "debugger" JavaScript statement.&lt;br /&gt;VS 2008 makes this much better by adding new support that allows us to set client-side JavaScript breakpoints directly within your server-side .aspx and .master source files.&lt;br /&gt;We can now set both client-side JavaScript breakpoints and VB/C# server-side breakpoints at the same time on the same page and use a single debugger to step through both the server-side and client-side code in a single debug session. This feature is extremely useful for AJAX applications. The breakpoints are fully supported in external JavaScript libraries as well.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;4. Few Other Features and Enhancements&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Below is a list of few other enhancements and new features included in Microsoft Visual Studio 2008.&lt;br /&gt;Project Designer&lt;br /&gt;Windows Presentation Foundation (WPF) applications have been added to Visual Studio 2008. There are four WPF project types:&lt;br /&gt;WinFX Windows Application&lt;br /&gt;WinFX Web Browser Application&lt;br /&gt;WinFX Custom Control Library&lt;br /&gt;WinFX Service Library&lt;br /&gt;When a WPF project is loaded in the IDE, the user interface of the Project Designer pages lets us specify properties specific to WPF applications.&lt;br /&gt;Data&lt;br /&gt;&lt;a name="data"&gt;Microsoft Visual Studio 2008 Beta 2 includes the following new features to incorporate data into applications: &lt;/a&gt;&lt;br /&gt;The Object Relational Designer (O/R Designer) assists developers in creating and editing the objects (LINQ to SQL entities) that map between an application and a remote database&lt;br /&gt;Hierarchical update capabilities in Dataset Designer, providing generated code that includes the save logic required to maintain referential integrity between related tables&lt;br /&gt;Local database caching incorporates an SQL Server Compact 3.5 database into an application and configures it to periodically synchronize the data with a remote database on a server. Local database caching enables applications to reduce the number of round trips between the application and a database server&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;LINQ – Language Integrated Query&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;LINQ is a new feature in VS 2008 that broadens great querying capabilities into the language syntax. LINQ introduces patterns for querying and updating data. A set of new assemblies are provided that enable the use of LINQ with collections, SQL databases, and XML documents.&lt;br /&gt;Visual Studio 2008 Debugger&lt;br /&gt;The Visual Studio 2008 debugger has been enhanced with the following features:&lt;br /&gt;Remote debugging support on Windows Vista&lt;br /&gt;Improved support for debugging multithreaded applications&lt;br /&gt;Debugging support for LINQ programming&lt;br /&gt;Debugging support for Windows Communications Foundation&lt;br /&gt;Support for script debugging, including client-side script files generated from server-side script now appear in Solution Explorer&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Reporting&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Visual Studio 2008 provides several new reporting features and improvements such as:&lt;br /&gt;New Report Projects: Visual Studio 2008 includes two new project templates for creating reporting applications. When we create a new Reports Application project, Visual Studio provides a report (.rdlc) and a form with a ReportViewer control bound to the report.&lt;br /&gt;Report Wizard: Visual Studio 2008 introduces a Report Wizard, which guides us through the steps to create a basic report. After we complete the wizard, we can enhance the report by using Report Designer.&lt;br /&gt;Expression Editor Enhancement: The Expression Editor now provides expressions that we can use directly or customize as required.&lt;br /&gt;PDF Compression: The ReportViewer controls can now compress reports that are rendered or exported to the PDF format.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;a href="http://209.85.175.104/search?q=cache:dhZnUUFP9ToJ:www.codeproject.com/KB/dotnet/Visual_Studio_2008.aspx+visual+studio+2008+new+features&amp;amp;hl=en&amp;amp;ct=clnk&amp;amp;cd=1"&gt;FOR VISUAL SCREEN SHOTS SEE THIS LINK&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-370729002104238270?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/370729002104238270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=370729002104238270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/370729002104238270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/370729002104238270'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/visual-studio-2008-advantages.html' title='VISUAL STUDIO 2008 Advantages'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-5189438099030004944</id><published>2008-08-29T07:10:00.000-07:00</published><updated>2008-08-29T07:19:50.634-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Common concepts'/><title type='text'>OBJECT ORIENTED PROGRAMING CONCEPT</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Why Object Oriented approach?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt; A major factor in the invention of Object-Oriented approach is to remove some of the flaws encountered with the procedural approach. In OOP, data is treated as a critical element and does not allow it to flow freely. It bounds data closely to the functions that operate on it and protects it from accidental modification from outside functions. OOP allows decomposition of a problem into a number of entities called objects and then builds data and functions around these objects. A major advantage of OOP is code reusability.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Some important features of Object Oriented programming are as follows:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Emphasis on data rather than procedure&lt;br /&gt;Programs are divided into Objects&lt;br /&gt;Data is hidden and cannot be accessed by external functions&lt;br /&gt;Objects can communicate with each other through functions&lt;br /&gt;New data and functions can be easily added whenever necessary&lt;br /&gt;Follows bottom-up approach&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Concepts of OOP:&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Objects&lt;br /&gt;Classes&lt;br /&gt;Data Abstraction and Encapsulation&lt;br /&gt;Inheritance&lt;br /&gt;Polymorphism&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Briefly on Concepts:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Objects &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Objects are the basic run-time entities in an object-oriented &lt;a href="http://www.startvbdotnet.com/oop/default.aspx" target="_new"&gt;system&lt;/a&gt;. Programming problem is analyzed in terms of objects and nature of communication between them. When a program is executed, objects interact with each other by sending messages. Different objects can also interact with each other without knowing the details of their data or code.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Classes &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;A class is a collection of objects of similar type. Once a class is defined, any number of objects can be created which belong to that class.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Data Abstraction and Encapsulation&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt; Abstraction refers to the act of representing essential features without including the background details or explanations. Classes use the concept of abstraction and are defined as a list of abstract attributes.Storing data and functions in a single unit (class) is encapsulation. Data cannot be accessible to the outside world and only those functions which are stored in the class can access it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Inheritance&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt; Inheritance is the process by which objects can acquire the properties of objects of other class. In OOP, inheritance provides reusability, like, adding additional features to an existing class without modifying it. This is achieved by deriving a new class from the existing one. The new class will have combined features of both the classes.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Polymorphism &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Polymorphism means the ability to take more than one form. An operation may exhibit different behaviors in different instances. The behavior depends on the data types used in the operation. Polymorphism is extensively used in implementing Inheritance.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Advantages of OOP&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Object-Oriented Programming has the following advantages over conventional approaches:&lt;br /&gt;OOP provides a clear modular structure for programs which makes it good for defining abstract datatypes where implementation details are hidden and the unit has a clearly defined &lt;a href="http://www.startvbdotnet.com/oop/default.aspx" target="_new"&gt;interface&lt;/a&gt;.&lt;br /&gt;OOP makes it easy to maintain and modify existing code as &lt;a href="http://www.startvbdotnet.com/oop/default.aspx" target="_new"&gt;new objects&lt;/a&gt; can be created with small differences to existing ones.&lt;br /&gt;OOP provides a good framework for code libraries where supplied &lt;a href="http://www.startvbdotnet.com/oop/default.aspx" target="_new"&gt;software&lt;/a&gt; components can be easily adapted and modified by the &lt;a href="http://www.startvbdotnet.com/oop/default.aspx" target="_new"&gt;programmer&lt;/a&gt;. This is particularly useful for developing graphical user interfaces.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-5189438099030004944?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/5189438099030004944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=5189438099030004944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5189438099030004944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5189438099030004944'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/object-oriented-programing-concept.html' title='OBJECT ORIENTED PROGRAMING CONCEPT'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-4775244096539001320</id><published>2008-08-29T06:49:00.000-07:00</published><updated>2008-08-29T06:51:19.844-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Requirements'/><title type='text'>SOME WALK - IN - WEBSITES</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:130%;color:#3333ff;"&gt;http://www.mywalkin.com/&lt;br /&gt;www.walkins.in/&lt;br /&gt;www.chalowalkin.com/&lt;br /&gt;www.yuvajobs.com/walkin.asp&lt;br /&gt;www.walkinsindia.com&lt;br /&gt;koolkampus.com/walkins/&lt;/span&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-4775244096539001320?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/4775244096539001320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=4775244096539001320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4775244096539001320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4775244096539001320'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/some-walk-in-websites.html' title='SOME WALK - IN - WEBSITES'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-1314434149102138858</id><published>2008-08-10T03:04:00.000-07:00</published><updated>2008-09-09T21:45:20.283-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='New Products'/><title type='text'>I-phone</title><content type='html'>I-Phone a revolution in mobile world. Cost's 20,000 inr in indian market.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_wEXVBmU8lj8/SJ69tCAJBxI/AAAAAAAAAAU/d4QSDDSZkN8/s1600-h/iphone-menu.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5232828398380320530" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_wEXVBmU8lj8/SJ69tCAJBxI/AAAAAAAAAAU/d4QSDDSZkN8/s320/iphone-menu.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_wEXVBmU8lj8/SJ69tL-Bz1I/AAAAAAAAAAc/UYOvS9hVpNE/s1600-h/iphone-sms.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5232828401055813458" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_wEXVBmU8lj8/SJ69tL-Bz1I/AAAAAAAAAAc/UYOvS9hVpNE/s320/iphone-sms.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_wEXVBmU8lj8/SJ69tR0bvxI/AAAAAAAAAAk/v5KtKG7RJCQ/s1600-h/thin-apple-iphone.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5232828402626182930" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_wEXVBmU8lj8/SJ69tR0bvxI/AAAAAAAAAAk/v5KtKG7RJCQ/s320/thin-apple-iphone.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-1314434149102138858?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/1314434149102138858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=1314434149102138858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1314434149102138858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1314434149102138858'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/i-phone.html' title='I-phone'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_wEXVBmU8lj8/SJ69tCAJBxI/AAAAAAAAAAU/d4QSDDSZkN8/s72-c/iphone-menu.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-1506157032576981671</id><published>2008-08-05T13:21:00.000-07:00</published><updated>2008-08-05T13:23:06.296-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Requirements'/><title type='text'>HCL OFF CAMPUS AT NISHITA</title><content type='html'>&lt;strong&gt;HCL OFF Campus Placement Drive on 08.08.2008 &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;at Nishitha College of Engineering &amp;amp; Technology &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;on TECH SUPPPORT&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;for more details visit &lt;/strong&gt;&lt;a href="http://www.nishitha.in/"&gt;&lt;strong&gt;www.nishitha.in&lt;/strong&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-1506157032576981671?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/1506157032576981671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=1506157032576981671' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1506157032576981671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1506157032576981671'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/hcl-off-campus-at-nishita.html' title='HCL OFF CAMPUS AT NISHITA'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-8300488944139138183</id><published>2008-08-05T00:43:00.000-07:00</published><updated>2008-08-05T00:45:39.344-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C-language'/><title type='text'>main() / void main() / int main() / int main(void) / int main(int argc, char *argv[])</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:130%;"&gt;=================================================&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;main() / void main() / int main() / int main(void) / int main(int argc, char *argv[])&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;A very common question is "What's the difference between void main and int main?". This particular FAQ tries to answer that and more, covering other versions of the main() implementation.&lt;br /&gt;The first thing to note is that this is one of those topics that people seem to like to argue over for hours, days and more. Some arguments are valid, some are not, and some are just plain old opinion.&lt;br /&gt;The C and C++ standards differ when it comes to main(), so I'll detail each one separately.&lt;br /&gt;For C&lt;br /&gt;Under C89, main() is acceptable, although it is advisable to use the C99 standard, under which only these are acceptable:&lt;br /&gt;int main ( void )int main ( int argc, char *argv[] )&lt;br /&gt;Slight variations of the above are acceptable, where int can be replaced by a typedef name defined as int, or the type of argv can be written as char ** argv, and so on.&lt;br /&gt;The first option is used when you do not require access to the command line arguments.&lt;br /&gt;The names argc and argv are identifiers that can be changed if you so desire, but sticking to argc/argv is convention.&lt;br /&gt;The return type of main() must always be an int, this allows a return code to be passed to the invoker.&lt;br /&gt;Under C89, the return statement at the end of main() is required, whereas under C99 if no return statement is present, return 0 is implied. However, it is good programming practice to always use a return statement, even if you don't have to.&lt;br /&gt;For C++&lt;br /&gt;The following are acceptable uses:&lt;br /&gt;int main ( int argc, char *argv[] )int main ()&lt;br /&gt;The first option follows similar conventions to those used by C99.&lt;br /&gt;The second option is used when you do not require access to the command line arguments, and is equivalent to the int main(void) option used by C99.&lt;br /&gt;Again, the return type must always be an int, and the function should return 0; at the end, but it is not required by the standard.&lt;br /&gt;(C) The difference between int main() and int main(void)&lt;br /&gt;A common misconception for C programmers, is to assume that a function prototyped as follows takes no arguments:&lt;br /&gt;int foo();&lt;br /&gt;In fact, this function is deemed to take an unknown number of arguments. Using the keyword void within the brackets is the correct way to tell the compiler that the function takes NO arguments.&lt;br /&gt;What's the deal with void main()&lt;br /&gt;Under regular function calling/returning in C and C++, if your don't ever want to return anything from a function, you define it's return type as void. For example, a function that takes no arguments, and returns nothing can be prototyped as:&lt;br /&gt;void foo(void);&lt;br /&gt;A common misconception is that the same logic can be applied to main(). Well, it can't, main() is special, you should always follow the standard and define the return type as int. There are some exceptions where void main() is allowed, but these are on specialised systems only. If you're not sure if you're using one of these specialised systems or not, then the answer is simply no, you're not. If you were, you'd know it.&lt;br /&gt;Be warned that if you post your "void main" code on the forums, you're going to get told to correct it. Responding with "my teacher said it's OK" is no defence; teachers have a bad habit of being wrong. Be safe, and post only standard code, and you'll find people concentrate on answering your other problems, rather than waste time telling you about this type of thing.&lt;br /&gt;But what about int main(int argc, char *argv[], char *envp[])&lt;br /&gt;As an extension to the guaranteed standard, an additional parameter to main() can, on some systems, be used to gain access to the environment variables. This is isn't guaranteed to work on all compilers, so use it with care if you want to keep your code portable.&lt;br /&gt;===================================================================&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-8300488944139138183?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/8300488944139138183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=8300488944139138183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/8300488944139138183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/8300488944139138183'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/main-void-main-int-main-int-mainvoid.html' title='main() / void main() / int main() / int main(void) / int main(int argc, char *argv[])'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-1200385749482081891</id><published>2008-08-05T00:42:00.001-07:00</published><updated>2008-08-05T00:43:13.748-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C-language'/><title type='text'>DIFFERENCE BETWEEN MALLOC CALLOC</title><content type='html'>===============================================================&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;DIFFERENCE BETWEEN MALLOC CALLOC&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;Both malloc and calloc do the same thing with almost the same results, they allocate a block of n * sizeof ( T ) bytes of memory. The difference is in how the functions are called and how the memory block is initialized. malloc is called like so:&lt;br /&gt;p = malloc ( n * sizeof ( T ) );&lt;br /&gt;where the user programmer performs the operation to find the final block size. calloc takes two arguments and performs the operation itself:&lt;br /&gt;p = calloc ( n, sizeof ( T ) );&lt;br /&gt;malloc leaves the block of memory uninitialized, but calloc zero fills the memory. This does not mean that&lt;br /&gt;p = calloc ( 1, sizeof ( int * ) );&lt;br /&gt;will result in a pointer to int with a value of NULL. Zero filled memory does not mean that the memory is filled with the data type's equivalent of 0, so this zero fill cannot be relied on except with integral values such as int or char. Pointers and floating point may use a different representation for 0 than all bits zero.&lt;br /&gt;Because of this zero fill, calloc can be slightly less efficient than malloc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-1200385749482081891?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/1200385749482081891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=1200385749482081891' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1200385749482081891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1200385749482081891'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/difference-between-malloc-calloc.html' title='DIFFERENCE BETWEEN MALLOC CALLOC'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-4995568721469655296</id><published>2008-08-05T00:40:00.000-07:00</published><updated>2008-08-05T00:41:44.246-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C-language'/><title type='text'>DIFFERENCES BETWEEN C and CPP</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:130%;"&gt;===================================================&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;DIFFERENCES BETWEEN C and CPP&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;Put simply, C++ is an extended C meant to improve safety, give the programmer more options, simplify higher level programming, and offer a better approach to large scale programming. C++ is also a larger language with more features and complexity than C, but C++ can improve productivity with its greater amount of features. A list of features that C++ supports which C does not includes:&lt;br /&gt;Classes&lt;br /&gt;Member functions&lt;br /&gt;Constructors and destructors&lt;br /&gt;Derived classes&lt;br /&gt;Virtual functions&lt;br /&gt;Abstract classes&lt;br /&gt;Access control (public, private, protected)&lt;br /&gt;friend functions&lt;br /&gt;Pointers to members&lt;br /&gt;static members&lt;br /&gt;mutable members&lt;br /&gt;Operator overloading&lt;br /&gt;References&lt;br /&gt;Templates&lt;br /&gt;Inline functions&lt;br /&gt;Default arguments&lt;br /&gt;Function overloading&lt;br /&gt;Namespaces&lt;br /&gt;Exception handling&lt;br /&gt;Run-time type identification&lt;br /&gt;// comments&lt;br /&gt;True const&lt;br /&gt;Declarations as statements&lt;br /&gt;Automatically typedef'd struct tags&lt;br /&gt;Type safe linkage&lt;br /&gt;new and delete&lt;br /&gt;bool keyword&lt;br /&gt;Safer and more robust casting&lt;br /&gt;===============================================================&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-4995568721469655296?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/4995568721469655296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=4995568721469655296' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4995568721469655296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4995568721469655296'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/differences-between-c-and-cpp.html' title='DIFFERENCES BETWEEN C and CPP'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-6797088838073352307</id><published>2008-08-05T00:37:00.001-07:00</published><updated>2008-08-05T00:39:41.345-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C-language'/><title type='text'>DIFFERENCES BETWEEN COUT,PRINTF</title><content type='html'>=================================================================&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;DIFFERENCES BETWEEN COUT,PRINTF&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;printf is a function that takes a variable number of arguments, the first argument being a format string explaining how to treat further arguments. cout is an object of the std::ostream class. The two are completely different in form, yet the result is the same, data sent to stdout.&lt;br /&gt;This question is difficult to answer completely as often phrased since cout and printf are wildly different, but most often one of three questions are meant:&lt;br /&gt;Q: "Which is faster?" A: printf, but the difference is too slight to worry about.&lt;br /&gt;Q: "Which is better?" A: Neither, it depends heavily on personal preference and what needs to be done.&lt;br /&gt;Q: "Which should I use?" A: You should use whichever you feel most comfortable with.It is preferred that you use iostreams with C++ instead of the C functions because iostreams are type safe and extensible for user defined types, both of which are very good reasons.&lt;br /&gt;===================================================================&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-6797088838073352307?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/6797088838073352307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=6797088838073352307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/6797088838073352307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/6797088838073352307'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/differences-between-coutprintf.html' title='DIFFERENCES BETWEEN COUT,PRINTF'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-4336954809646231751</id><published>2008-08-05T00:30:00.000-07:00</published><updated>2008-08-05T00:37:18.372-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C-language'/><title type='text'>DIFFERENCES BETWEEN NULL AND 0, \0</title><content type='html'>==============================================================&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;DIFFERENCES BETWEEN NULL AND 0, \0&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;NULL is a macro defined in several standard headers, 0 is an integer constant, '\0' is a character constant, and nul is the name of the character constant. All of these are *not* interchangeable:&lt;br /&gt;NULL is to be used for pointers only since it may be defined as ((void *)0), this would cause problems with anything but pointers.&lt;br /&gt;0 can be used anywhere, it is the generic symbol for each type's zero value and the compiler will sort things out.&lt;br /&gt;'\0' should be used only in a character context.&lt;br /&gt;nul is not defined in C or C++, it shouldn't be used unless you define it yourself in a suitable manner, like:&lt;br /&gt;#define nul '\0'&lt;br /&gt;=============================================================&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-4336954809646231751?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/4336954809646231751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=4336954809646231751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4336954809646231751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4336954809646231751'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/differences-between-null-and-0-0.html' title='DIFFERENCES BETWEEN NULL AND 0, \0'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-5305346261323678853</id><published>2008-08-02T18:46:00.001-07:00</published><updated>2008-08-02T18:56:57.081-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Aptitude placement papers'/><title type='text'>APTITUDE QUESTIONS</title><content type='html'>&lt;span style="font-size:180%;"&gt;&lt;strong&gt;Aptitude Questions&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;=================================================================&lt;br /&gt;1.If 2x-y=4 then 6x-3y=?(a)15(b)12(c)18(d)10&lt;br /&gt;Ans. (b)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.If x=y=2z and xyz=256 then what is the value of x?&lt;br /&gt;(a)12(b)8(c)16(d)6&lt;br /&gt;Ans. (b)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. (1/10)18 - (1/10)20 = ?(a) 99/1020(b) 99/10(c) 0.9(d) none of these&lt;br /&gt;Ans. (a)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4.Pipe A can fill in 20 minutes and Pipe B in 30 minsand Pipe C canempty the same in 40 mins.If all of them worktogether, find the timetaken to fill the tank(a) 17 1/7 mins(b) 20 mins(c) 8 mins(d) none of these&lt;br /&gt;Ans. (a)&lt;br /&gt;&lt;br /&gt;5. Thirty men take 20 days to complete a job working 9hours a day.Howmany hour a day should 40 men work to complete thejob?(a) 8 hrs(b) 7 1/2 hrs(c) 7 hrs(d) 9 hrs&lt;br /&gt;Ans. (b)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6. Find the smallest number in a GP whose sum is 38and product 1728(a) 12(b) 20(c) 8(d) none of these&lt;br /&gt;Ans. (c)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. A boat travels 20 kms upstream in 6 hrs and 18 kmsdownstream in 4hrs.Find the speed of the boat in still water and thespeed of thewater current?(a) 1/2 kmph(b) 7/12 kmph(c) 5 kmph(d) none of these&lt;br /&gt;Ans. (b)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8. A goat is tied to one corner of a square plot ofside 12m by a rope7m long.Find the area it can graze?(a) 38.5 sq.m(b) 155 sq.m(c) 144 sq.m(d) 19.25 sq.m&lt;br /&gt;Ans. (a)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9. Mr. Shah decided to walk down the escalator of atube station. Hefound that if he walks down 26 steps, he requires 30seconds toreach the bottom. However, if he steps down 34 stairshe would onlyrequire 18 seconds to get to the bottom. If the timeis measured fromthe moment the top step begins to descend to thetime he steps offthe last step at the bottom, find out the height ofthe stair way insteps?&lt;br /&gt;Ans.46 steps.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10. The average age of 10 members of a committee isthe same as it was4 years ago, because an old member has been replacedby a youngmember. Find how much younger is the new member ?&lt;br /&gt;Ans.40 years.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11. Three containers A, B and C have volumes a, b, andc respectively;and container A is full of water while the other twoare empty. Iffrom container A water is poured into container Bwhich becomes 1/3full, and into container C which becomes 1/2 full, howmuch water isleft in container A?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12. ABCE is an isosceles trapezoid and ACDE is arectangle. AB = 10and EC = 20. What is the length of AE?&lt;br /&gt;Ans. AE = 10.&lt;br /&gt;&lt;br /&gt;13. In the given figure, PA and PB are tangents to thecircle at A andB respectively and the chord BC is parallel totangent PA. If AC = 6cm, and length of the tangent AP is 9 cm, then whatis the length ofthe chord BC?&lt;br /&gt;Ans. BC = 4 cm.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;15 Three cards are drawn at random from an ordinarypack of cards.Find the probability that they will consist of a king,a queen and an ace.&lt;br /&gt;Ans. 64/2210.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;16. A number of cats got together and decided to killbetween them999919 mice. Every cat killed an equal number ofmice. Each catkilled more mice than there were cats. How many catsdo you thinkthere were ?&lt;br /&gt;Ans. 991.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;17. If Log2 x - 5 Log x + 6 = 0, then what would thevalue / values ofx be?&lt;br /&gt;Ans. x = e2 or e3.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;18. The square of a two digit number is divided byhalf the number.After 36 is added to the quotient, this sum is thendivided by 2.The digits of the resulting number are the same asthose in theoriginal number, but they are in reverse order. Theten's place ofthe original number is equal to twice the differencebetween itsdigits. What is the number?&lt;br /&gt;Ans. 46&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;19.Can you tender a one rupee note in such a mannerthat there shallbe total 50 coins but none of them would be 2 paisecoins.?&lt;br /&gt;Ans. 45 one paisa coins, 2 five paise coins, 2 tenpaise coins, and 1twenty-five paise coins.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;20.A monkey starts climbing up a tree 20ft. tall. Eachhour, it hops3ft. and slips back 2ft. How much time would it takethe monkey toreach the top?&lt;br /&gt;Ans.18 hours.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;21. What is the missing number in this series? 8 214 6 11 ? 14 6 18 12&lt;br /&gt;Ans. 9&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;22. A certain type of mixture is prepared by mixingbrand A at Rs.9 akg. with brand B at Rs.4 a kg. If the mixture is worthRs.7 a kg., howmany kgs. of brand A are needed to make 40kgs. ofthe mixture?&lt;br /&gt;Ans. Brand A needed is 24kgs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;23. A wizard named Nepo says "I am only three times myson's age. Myfather is 40 years more than twice my age. Togetherthe three of usare a mere 1240 years old." How old is Nepo?Ans. 360 years old.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;24. One dog tells the other that there are two dogs infront of me.The other one also shouts that he too had two behindhim. How many arethey?&lt;br /&gt;Ans. Three.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;25. A man ate 100 bananas in five days, each dayeating 6 more thanthe previous day. How many bananas did he eat on thefirst day?&lt;br /&gt;Ans. Eight.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;26. If it takes five minutes to boil one egg, how longwill it take toboil four eggs?&lt;br /&gt;Ans. Five minutes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;27. The minute hand of a clock overtakes the hour handat intervals of64 minutes of correct time. How much a day does theclock gain or lose?&lt;br /&gt;Ans. 32 8/11 minutes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;28. Solve for x and y: 1/x - 1/y = 1/3, 1/x2 + 1/y2= 5/9.Ans. x = 3/2 or -3 and y = 3 or -3/2.&lt;br /&gt;29. Daal is now being sold at Rs. 20 a kg. During lastmonth its ratewas Rs. 16 per kg. By how much percent should a familyreduce itsconsumption so as to keep the expenditure fixed?&lt;br /&gt;Ans. 20 %.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;30. Find the least value of 3x + 4y if x2y3 = 6.Ans. 10.31. Can you find out what day of the week was January12, 1979?&lt;br /&gt;Ans. Friday.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;32. A garrison of 3300 men has provisions for 32 days,when given at arate of 850 grams per head. At the end of 7 days areinforcementarrives and it was found that now the provisions willlast 8 daysless, when given at the rate of 825 grams per head.How, many more mencan it feed?&lt;br /&gt;Ans. 1700 men.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;33. From 5 different green balls, four different blueballs and threedifferent red balls, how many combinations of ballscan be chosentaking at least one green and one blue ball?&lt;br /&gt;Ans. 3720.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;34. Three pipes, A, B, &amp;amp; C are attached to a tank. A &amp;amp;B can fill itin 20 &amp;amp; 30 minutes respectively while C can empty itin 15 minutes.If A, B &amp;amp; C are kept open successively for 1 minuteeach, how soonwill the tank be filled?&lt;br /&gt;Ans. 167 minutes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;35. A person walking 5/6 of his usual rate is 40minutes late. What ishis usual time?&lt;br /&gt;Ans. 3 hours 20 minutes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;36.&lt;/strong&gt;For a motorist there are three ways going from CityA to City C. Byway of bridge the distance is 20 miles and toll is$0.75. A tunnelbetween the two cities is a distance of 10 miles andtoll is $1.00 forthe vehicle and driver and $0.10 for each passenger. Atwo-lanehighway without toll goes east for 30 miles to city Band then 20miles in a northwest direction to City C.&lt;br /&gt;1. Which is the shortest route from B to C&lt;br /&gt;(a) Directly on toll free highway to City C(b) The bridge(c) The Tunnel(d) The bridge or the tunnel(e) The bridge only if traffic is heavy on the tollfree highway&lt;br /&gt;Ans. (a)&lt;br /&gt;2. The most economical way of going from City A toCity B, in terms oftoll and distance is to use the&lt;br /&gt;(a) tunnel(b) bridge(c) bridge or tunnel(d) toll free highway(e) bridge and highway&lt;br /&gt;Ans. (a)&lt;br /&gt;3. Jim usually drives alone from City C to City Aevery working day.His firm deducts a percentage of employee pay forlateness. Whichfactor would most influence his choice of the bridgeor the tunnel ?&lt;br /&gt;(a) Whether his wife goes with him(b) scenic beauty on the route(c) Traffic conditions on the road, bridge and tunnel(d) saving $0.25 in tolls(e) price of gasoline consumed in covering additional10 miles on thebridge&lt;br /&gt;Ans. (a)&lt;br /&gt;4. In choosing between the use of the bridge and thetunnel the chieffactor(s) would be:I. Traffic and road conditionsII. Number of passengers in the carIII. Location of one's homes in the center oroutskirts of one of thecitiesIV. Desire to save $0.25&lt;br /&gt;(a) I only(b) II only(c) II and III only(d) III and IV only(e) I and II only&lt;br /&gt;Ans. (a)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;37.&lt;/strong&gt;The letters A, B, C, D, E, F and G, not necessarilyin that order,stand for seven consecutive integers from 1 to 10D is 3 less than AB is the middle termF is as much less than B as C is greater than DG is greater than F&lt;br /&gt;1. The fifth integer is(a) A(b) C(c) D(d) E(e) F&lt;br /&gt;Ans. (a)&lt;br /&gt;2. A is as much greater than F as which integer isless than G(a) A(b) B(c) C(d) D(e) E&lt;br /&gt;Ans. (a)&lt;br /&gt;3. If A = 7, the sum of E and G is(a) 8(b) 10(c) 12(d) 14(e) 16&lt;br /&gt;Ans. (a)&lt;br /&gt;4. A - F = ?(a) 1(b) 2(c) 3(d) 4(e) Cannot be determined&lt;br /&gt;Ans. (a)&lt;br /&gt;5. An integer T is as much greater than C as C isgreater than E. Tcan be written as A + E. What is D?(a) 2(b) 3(c) 4(d) 5(e) Cannot be determined&lt;br /&gt;Ans. (a)&lt;br /&gt;6. The greatest possible value of C is how muchgreater than thesmallest possible value of D?(a) 2(b) 3(c) 4(d) 5(e) 6&lt;br /&gt;Ans. (a)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;38.&lt;/strong&gt;1. All G's are H's2. All G's are J's or K's3. All J's and K's are G's4. All L's are K's5. All N's are M's6. No M's are G's&lt;br /&gt;1. If no P's are K's, which of the following must betrue?&lt;br /&gt;(a) All P's are J's(b) No P is a G(c) No P is an H(d) If any P is an H it is a G(e) If any P is a G it is a J&lt;br /&gt;Ans. (a)&lt;br /&gt;2. Which of the following can be logically deducedfrom the conditionsstated?&lt;br /&gt;(a) No M's are H's(b) No M's that are not N's are H's(c) No H's are M's(d) Some M's are H's(e) All M's are H's&lt;br /&gt;Ans. (a)&lt;br /&gt;3. Which of the following is inconsistent with one ormore of theconditions?&lt;br /&gt;(a) All H's are G's(b) All H's that are not G's are M's(c) Some H's are both M's and G's(d) No M's are H's(e) All M's are H's&lt;br /&gt;Ans. (a)&lt;br /&gt;4. The statement "No L's are J's" isI. Logically deducible from the conditions statedII. Consistent with but not deducible from theconditions statedIII. Deducible from the stated conditions togetherwith the additionalstatement "No J's are K's"&lt;br /&gt;(a) I only(b) II only(c) III only(d) II and III only(e) Neither I, II nor III&lt;br /&gt;Ans. (a)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;39.&lt;/strong&gt;In country X, democratic, conservative and justiceparties havefought three civil wars in twenty years. TO restorestability anagreement is reached to rotate the top officesPresident, PrimeMinister and Army Chief among the parties so that eachparty controlsone and only one office at all times. The three topoffice holdersmust each have two deputies, one from each of theother parties. Eachdeputy must choose a staff composed of equally membersof his or herchiefs party and member of the third party.&lt;br /&gt;1. When Justice party holds one of the top offices,which of thefollowing cannot be true&lt;br /&gt;(a) Some of the staff members within that office arejustice party members(b) Some of the staff members within that office aredemocratic partymembers(c) Two of the deputies within the other offices arejustice party members(d) Two of the deputies within the other offices areconservativeparty members(e) Some of the staff members within the other officesare justiceparty members.&lt;br /&gt;Ans. (a)&lt;br /&gt;2. When the democratic party holds presidency, thestaff of the primeminister's deputies are composedI. One-fourth of democratic party membersII. One-half of justice party members and one-fourthof conservativeparty membersIII. One-half of conservative party members andone-fourth of justiceparty members.&lt;br /&gt;(a) I only(b) I and II only(c) II or III but not both(d) I and II or I and III(e) None of these&lt;br /&gt;Ans. (a)&lt;br /&gt;3. Which of the following is allowable under the rulesas stated:&lt;br /&gt;(a) More than half of the staff within a given officebelonging to asingle party(b) Half of the staff within a given office belongingto a single party(c) Any person having a member of the same party ashis or herimmediate superior(d) Half the total number of staff members in allthree officesbelonging to a single party(e) Half the staff members in a given office belongingto partiesdifferent from the party of the top office holder inthat office.&lt;br /&gt;Ans. (a)&lt;br /&gt;4. The office of the Army Chief passes fromConservative to Justiceparty. Which of the following must be fired.&lt;br /&gt;(a) The democratic deputy and all staff membersbelonging to Justice party(b) Justice party deputy and all his or hers staffmembers(c) Justice party deputy and half of his Conservativestaff members inthe chief of staff office(d) The Conservative deputy and all of his or herstaff membersbelonging to Conservative party(e) No deputies and all staff members belonging toconservative parties.&lt;br /&gt;Ans. (a)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;40.&lt;/strong&gt;In recommendations to the board of trustees atuition increase of$500 per year, the president of the university said"There were nostudent demonstrations over the previous increases of$300 last yearand $200 the year before". If the president'sstatement is accuratethen which of the following can be validly inferredfrom theinformation given:I. Most students in previous years felt that theincreases werejustified because of increased operating costs.II. Student apathy was responsible for the failure ofstudents toprotest the previous tuition increases.III. Students are not likely to demonstrate over newtuition increases.&lt;br /&gt;(a) I only(b) II only(c) I or II but not both(d) I, II and III(e) None&lt;br /&gt;Ans. (a)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;41.&lt;/strong&gt; The office staff of XYZ corporation presentlyconsists of threebookeepers--A, B, C and 5 secretaries D, E, F, G, H.The management isplanning to open a new office in another city using 2bookeepers and 3secretaries of the present staff . To do so they planto seperatecertain individuals who don't function well together.The followingguidelines were established to set up the new officeI. Bookeepers A and C are constantly finding faultwith one anotherand should not be sent together to the new office as ateamII. C and E function well alone but not as a team ,they should beseperatedIII. D and G have not been on speaking terms andshouldn't go togetherIV Since D and F have been competing for promotionthey shouldn't be ateam1.If A is to be moved as one of the bookeepers,whichof the followingcannot be a possible working unit.&lt;br /&gt;A.ABDEHB.ABDGHC.ABEFHD.ABEGH&lt;br /&gt;Ans.B&lt;br /&gt;2.If C and F are moved to the new office,how manycombinations arepossible&lt;br /&gt;A.1B.2C.3D.4&lt;br /&gt;Ans.A&lt;br /&gt;3.If C is sent to the new office,which member of thestaff cannot gowith C&lt;br /&gt;A.BB.DC.FD.G&lt;br /&gt;Ans.B&lt;br /&gt;4.Under the guidelines developed,which of thefollowing must go to thenew office&lt;br /&gt;A.BB.DC.ED.G&lt;br /&gt;Ans.A&lt;br /&gt;5.If D goes to the new office,which of the followingis/are true&lt;br /&gt;I.C cannot goII.A cannot goIII.H must also go&lt;br /&gt;A.I onlyB.II onlyC.I and II onlyD.I and III only&lt;br /&gt;Ans.D&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;42.&lt;/strong&gt;After months of talent searching for anadministrative assistant tothe president of the college the field of applicantshas been narroweddown to 5--A, B, C, D, E .It was announced that thefinalist would bechosen after a series of all-day group personalinterviews wereheld.The examining committee agreed upon the followingprocedure&lt;br /&gt;I.The interviews will be held once a weekII.3 candidates will appear at any all-day interviewsessionIII.Each candidate will appear at least onceIV.If it becomes necessary to call applicants foradditonalinterviews, no more 1 such applicant should be askedto appear thenext weekV.Because of a detail in the written applications,itwas agreed thatwhenever candidate B appears, A should also bepresent.VI.Because of travel difficulties it was agreed that Cwill appear foronly 1 interview.1.At the first interview the following candidatesappear A,B,D.Whichof the follwing combinations can be called for theinterview to beheld next week.&lt;br /&gt;A.BCDB.CDEC.ABED.ABC&lt;br /&gt;Ans.B&lt;br /&gt;2.Which of the following is a possible sequence ofcombinations forinterviews in 2 successive weeks&lt;br /&gt;A.ABC;BDEB.ABD;ABEC.ADE;ABCD.BDE;ACD&lt;br /&gt;Ans.C&lt;br /&gt;3.If A ,B and D appear for the interview and D iscalled foradditional interview the following week,which 2candidates may beasked to appear with D?&lt;br /&gt;I. AII BIII.CIV.EA.I and IIB.I and III onlyC.II and III onlyD.III and IV only&lt;br /&gt;Ans.D&lt;br /&gt;4.Which of the following correctly state(s) theprocedure followed bythe search committee&lt;br /&gt;I.After the second interview all applicants haveappeared at least onceII.The committee sees each applicant a second timeIII.If a third session,it is possible for allapplicants to appear atleast twice&lt;br /&gt;A.I onlyB.II onlyC.III onlyD.Both I and II&lt;br /&gt;Ans.A&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;43.&lt;/strong&gt; A certain city is served by subway lines A,B and Cand numbers 1 2and 3When it snows , morning service on B is delayedWhen it rains or snows , service on A, 2 and 3 aredelayed both in themorning and afternoonWhen temp. falls below 30 degrees farenheit afternoonservice iscancelled in either the A line or the 3 line,but not both.When the temperature rises over 90 degrees farenheit,the afternoonservice is cancelled in either the line C or the3 line but not both.When the service on the A line is delayed orcancelled, service on theC line which connects the A line, is delayed.When service on the 3 line is cancelled, service onthe B line whichconnects the 3 line is delayed.&lt;br /&gt;Q1. On Jan 10th, with the temperature at 15 degreefarenheit, itsnows all day. On how many lines will service beaffected, including both morning and afternoon.(A) 2(B) 3(C) 4(D) 5Ans. D&lt;br /&gt;Q2. On Aug 15th with the temperature at 97 degreesfarenheit it beginsto rain at 1 PM. What is the minimum numberof lines on which service will be affected?(A) 2(B) 3(C) 4(D) 5Ans. C&lt;br /&gt;Q3. On which of the following occasions would servicebe on thegreatest number of lines disrupted.(A) A snowy afternoon with the temperature at 45degree farenheit(B) A snowy morning with the temperature at 45 degreefarenheit(C) A rainy afternoon with the temperature at 45degree farenheit(D) A rainy afternoon with the temperature at 95degree farenheitAns. B&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;44.&lt;/strong&gt; In a certain society, there are two marriagegroups, red andbrown. No marriage is permitted within a group. Onmarriage, malesbecome part of their wives groups; women remain intheir own group.Children belong to the same group as their parents.Widowers anddivorced males revert to the group of their birth.Marriage to morethan one person at the same time and marriage to adirect descendantare forbiddenQ1. A brown female could have hadI. A grandfather born RedII. A grandmother born RedIII Two grandfathers born Brown(A) I only(B) III only(C) I, II and III(D) I and II onlyAns. D&lt;br /&gt;Q2. A male born into the brown group may have(A) An uncle in either group(B) A brown daughter(C) A brown son(D) A son-in-law born into red groupAns. A&lt;br /&gt;Q3. Which of the following is not permitted under therules as stated.(A) A brown male marrying his father's sister(B) A red female marrying her mother's brother(C) A widower marrying his wife's sister(D) A widow marrying her divorced daughter'sex-husbandAns. B&lt;br /&gt;Q4. If widowers and divorced males retained theirgroup they had uponmarrying which of the following would be permissible (Assume that noprevious marriage occurred)(A) A woman marrying her dead sister's husband(B) A woman marrying her divorced daughter'sex-husband(C) A widower marrying his brother's daughter(D) A woman marrying her mother's brother who is awidower.Ans. D&lt;br /&gt;Q5. I. All G's are H'sII. All G's are J's or K'sIII All J's and K's are G'sIV All L's are K'sV All N's are M'sVI No M's are G's&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;45.&lt;/strong&gt; There are six steps that lead from the first tothe second floor.No two people can be on the same stepMr. A is two steps below Mr. CMr. B is a step next to Mr. DOnly one step is vacant ( No one standing on that step)Denote the first step by step 1 and second step bystep 2 etc.1. If Mr. A is on the first step, Which of thefollowing is true?(a) Mr. B is on the second step(b) Mr. C is on the fourth step.(c) A person Mr. E, could be on the third step(d) Mr. D is on higher step than Mr. C.Ans: (d)2. If Mr. E was on the third step &amp;amp; Mr. B was on ahigher step thanMr. E which step must be vacant(a) step 1(b) step 2(c) step 4(d) step 5(e) step 6Ans: (a)&lt;br /&gt;&lt;br /&gt;3. If Mr. B was on step 1, which step could A be on?(a) 2&amp;amp;e only(b) 3&amp;amp;5 only(c) 3&amp;amp;4 only(d) 4&amp;amp;5 only(e) 2&amp;amp;4 onlyAns: (c)&lt;br /&gt;4. If there were two steps between the step that A wasstanding andthe step that B was standing on, and A was on a higherstep than D , Amust be on step(a) 2(b) 3(c) 4(d) 5(e) 6Ans: (c)&lt;br /&gt;5. Which of the following is false&lt;br /&gt;i. B&amp;amp;D can be both on odd-numbered steps in oneconfigurationii. In a particular configuration A and C must eitherboth an oddnumbered steps or both an even-numbered stepsiii. A person E can be on a step next to the vacantstep.(a) i only(b) ii only(c) iii only(d) both i and iiiAns: (c)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;46.&lt;/strong&gt; Six swimmers A, B, C, D, E, F compete in a race.The outcome is asfollows.i. B does not win.ii. Only two swimmers separate E &amp;amp; Diii. A is behind D &amp;amp; Eiv. B is ahead of E , with one swimmer interveningv. F is a head of D1. Who stood fifth in the race ?(a) A(b) B(c) C(d) D(e) EAns: (e)2. How many swimmers seperate A and F ?(a) 1(b) 2(c) 3(d) 4(e) cannot be determinedAns: (d)3. The swimmer between C &amp;amp; E is(a) none(b) F(c) D(d) B(e) AAns: (a)&lt;br /&gt;4. If the end of the race, swimmer D is disqualifiedby the Judgesthen swimmer B finishes in which place(a) 1(b) 2(c) 3(d) 4(e) 5Ans: (b)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;47.&lt;/strong&gt; Five houses lettered A,B,C,D, &amp;amp; E are built in arow next to eachother. The houses are lined up in the order A,B,C,D, &amp;amp;E. Each of thefive houses has a colored chimney. The roof andchimney of eachhousemust be painted as follows.i. The roof must be painted either green,red ,oryellow.ii. The chimney must be painted either white, black,or red.iii. No house may have the same color chimney as thecolor of roof.iv. No house may use any of the same colors that theevery next houseuses.v. House E has a green roof.vi. House B has a red roof and a black chimney&lt;br /&gt;1. Which of the following is true ?(a) At least two houses have black chimney.(b) At least two houses have red roofs.(c) At least two houses have white chimneys(d) At least two houses have green roofs(e) At least two houses have yellow roofsAns: (c)&lt;br /&gt;2. Which must be false ?(a) House A has a yellow roof(b) House A &amp;amp; C have different color chimney(c) House D has a black chimney(d) House E has a white chimney(e) House B&amp;amp;D have the same color roof.Ans: (b)&lt;br /&gt;3. If house C has a yellow roof. Which must be true.(a) House E has a white chimney(b) House E has a black chimney(c) House E has a red chimney(d) House D has a red chimney(e) House C has a black chimneyAns: (a)&lt;br /&gt;4. Which possible combinations of roof &amp;amp; chimney canhouseI. A red roof 7 a black chimneyII. A yellow roof &amp;amp; a red chimneyIII. A yellow roof &amp;amp; a black chimney&lt;br /&gt;(a) I only(b) II only(c) III only(d) I &amp;amp; II only(e) I&amp;amp;II&amp;amp;IIIAns: (e)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;48.&lt;/strong&gt; Find x+2y(i). x+y=10(ii). 2x+4y=20&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;49.&lt;/strong&gt; Is angle BAC is a right angle(i) AB=2BC(2) BC=1.5AC&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;50. Is x greater than y(i) x=2k(ii) k=2y&lt;br /&gt;===================================================================&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-5305346261323678853?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/5305346261323678853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=5305346261323678853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5305346261323678853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5305346261323678853'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/aptitude-questions_02.html' title='APTITUDE QUESTIONS'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-1282080807811897157</id><published>2008-08-02T02:11:00.000-07:00</published><updated>2008-08-02T02:15:10.152-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Aptitude placement papers'/><title type='text'>APTITUDE QUESTIONS</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;strong&gt;=============================================&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-size:130%;color:#ff6600;"&gt;&lt;strong&gt;APTITUDE QUESTIONS WITH ANSWERS AND EXPLANATION&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;100 Puzzles with Answers and Explanation&lt;br /&gt;&lt;a href="http://www.eurl.in/u/Puzzles_with_Answers" target="_blank"&gt;http://www.eurl.in/u/Puzzles_with_Answers&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Collection of Aptitude Questions with Answers Part -1&lt;br /&gt;&lt;a href="http://www.eurl.in/u/Aptitude_Part_1" target="_blank"&gt;http://www.eurl.in/u/Aptitude_Part_1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Collection of Aptitude Questions with Answers Part - 2&lt;br /&gt;&lt;a href="http://www.eurl.in/u/Aptitude_Part_2" target="_blank"&gt;http://www.eurl.in/u/Aptitude_Part_2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Collection of Aptitude Questions with Answers Part - 3&lt;br /&gt;&lt;a href="http://www.eurl.in/u/Aptitude_Part_3" target="_blank"&gt;http://www.eurl.in/u/Aptitude_Part_3&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Collection of Numerical Ability Questions Asked in Different Companies&lt;br /&gt;&lt;a href="http://www.eurl.in/u/Numerical-Ability" target="_blank"&gt;http://www.eurl.in/u/Numerical-Ability&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Collection of Reasoning Questions Asked in Different Companies&lt;br /&gt;&lt;a href="http://www.eurl.in/u/Reasoning" target="_blank"&gt;http://www.eurl.in/u/Reasoning&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Collection of Verbal Questions Asked in Different Companies&lt;br /&gt;&lt;a href="http://www.eurl.in/u/Verbal" target="_blank"&gt;http://www.eurl.in/u/Verbal&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;=============================================================&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-1282080807811897157?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/1282080807811897157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=1282080807811897157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1282080807811897157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1282080807811897157'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/aptitude-questions.html' title='APTITUDE QUESTIONS'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-564413978854304731</id><published>2008-08-01T22:33:00.000-07:00</published><updated>2008-08-01T22:34:20.482-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Requirements'/><title type='text'>REQUIREMENT ON RIKTAM TECHNOLOGIES</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:130%;"&gt;send u r resume to &lt;/span&gt;&lt;/strong&gt;&lt;a href="http://mail.google.com/mail/h/106d51vgoungf/?v=b&amp;amp;cs=wh&amp;amp;to=riktam@gmail.com" target="_blank" rel="nofollow"&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;riktam@gmail.com&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;1. Test would consist of 2 rounds of aptitude test (Analytical / Logical / Puzzles). Interviewer may ask basic C/C++/Java questions, but very less.&lt;br /&gt;2. There is no fees to attend the test&lt;br /&gt;3. Your friends can also attend the aptitude test for selection. They should email their resume to  &lt;/strong&gt;&lt;a href="http://mail.google.com/mail/h/106d51vgoungf/?v=b&amp;amp;cs=wh&amp;amp;to=riktam@gamil.com" target="_blank" rel="nofollow"&gt;&lt;strong&gt;riktam@gamil.com&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;if your cv mathes our requirement u will get immedaite mails stating the  written test details.&lt;br /&gt;&lt;br /&gt;HR manager....( Riktam Technologies ).. Prasad K9848558696&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-564413978854304731?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/564413978854304731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=564413978854304731' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/564413978854304731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/564413978854304731'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/requirement-on-riktam-technologies.html' title='REQUIREMENT ON RIKTAM TECHNOLOGIES'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-8014534127505874579</id><published>2008-08-01T21:54:00.000-07:00</published><updated>2008-08-01T21:59:53.410-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Requirements'/><title type='text'>BPO and TECH SUPPORT</title><content type='html'>&lt;strong&gt;Hyderabad Jumbo Job Fair - 2008 On August 02, 03 At Hyderabad Walk-in Date: August 02 &amp;amp; 03 Time: 10.00am - 6.00 pm Venue: Hitex Exhibition Centre, Madhapur, Hitech City Hyderabad-500032..&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;BPO and TECH SUPPORT ONLY&lt;/span&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-8014534127505874579?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/8014534127505874579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=8014534127505874579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/8014534127505874579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/8014534127505874579'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/08/bpo-and-tech-support.html' title='BPO and TECH SUPPORT'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-5474747267975974724</id><published>2008-07-28T22:03:00.001-07:00</published><updated>2008-07-28T22:06:47.644-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>ORACLE INTRODUCTIN</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;ORACLE INTRODUCTION&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;                        Before database was invented, File system is used to store data in computers. Because of the disadvantages like data redundancy, atomicity, consistency and security in file system, Database Management System (DBMS) was introduced. Collection of related data is called as Database. Collection of inter-related data and a set of programs to access those data is called as Database Management Sysytem (DBMS). Oracle is a Database Management System Software.&lt;br /&gt;                       &lt;br /&gt;After DBMS came in to practice, several models are proposed in DBMS with different types of storage methods for the data within the database. Among them Relational Database Model is the widely used data model. Relational Database model was proposed by E.F.Codd. In Relational Database Model, Data is stored in the form of relations or tables. A table is comprised of rows and columns. A row is also called as a Tuple and a column is called as an Attribute. Relational Database Model was developed based on the concepts of Relational Algebra and Relational Calculus.&lt;br /&gt;                       &lt;br /&gt;                        Another development in DBMS is introducing Object Oriented Programming (OOP) concepts in DBMS. By this concept, new database models called Object Oriented Database Models were introduced. A new model called Object Relational Database Model was developed by incorporating OOPS concepts in relational database model.&lt;br /&gt;                       &lt;br /&gt;                        Upto Version 7.3, Oracle is Relational Database Management System Software. But from version 8.0 onwards, Oracle is Object Relational Database Management System Software (ORDBMS). After version 8.0, Oracle version 8i was released. In this version, Oracle has provided the features by using which we can interact with the Internet. After Version 8i, another version 9i was released. Most of the new features in 9i are towards the Architecture and DBA related and some new features are added towards application development side.&lt;br /&gt;&lt;br /&gt;                        Oracle Provides several tools to access the database. Among them the tools that are covered in this book are SQL, PL/SQL,  FORMS and REPORTS. Forms and Reports are combinedly called as Developer/2000 or simply D2k. New version of D2k is 6i and is released along with database release 8i.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-5474747267975974724?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/5474747267975974724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=5474747267975974724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5474747267975974724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5474747267975974724'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/oracle-introductin.html' title='ORACLE INTRODUCTIN'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-2477027774711790821</id><published>2008-07-28T22:03:00.000-07:00</published><updated>2008-07-28T22:05:19.218-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>SQL Introduction and Data Types</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;SQL ( Structured Query Language )&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;SQL is a common language to interact with the database in any RDBMS software.&lt;br /&gt;IBM Corporation first developed SQL. They have developed SQL as a part of&lt;br /&gt;System-R project. After recognizing the ease and flexibility of this part, they have developed it as a separate language and named it as SEQUEL (Structured English Query Language).&lt;br /&gt;Oracle Corporation first commercially released SEQUEL by changing its name to SQL.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Features Of SQL&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;SQL is a 4th generation (4 GL) or Non procedural language.&lt;br /&gt;Every statement in SQL must end with a semicolon.&lt;br /&gt;SQL is not a case sensitive language.&lt;br /&gt;In SQL at a time a single SQL statement is stored in buffer. To re-execute the statement stored in buffer we have to use ‘/’.&lt;br /&gt;In SQL a single SQL statement can be broken into more than one line without using any continuation character.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Datatypes In SQL&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To represent data in database we have to create tables. During the creation of a table we have to specify the columns to be included in the table and the type of values that are going to be stored in those columns. The data types available in SQL are as follows.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;strong&gt;Number :&lt;/strong&gt;&lt;/span&gt; This data type is used to store numeric values in a column. For number datatype maximum allowed digits is specified in parantheses. For example, if we specify the datatype as number(5) then we can store –99,999 to +99,999 in that column.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Char :&lt;/span&gt;&lt;/strong&gt; This data type is used to store fixed length character data. Max. Allowed size for Char is 1000 bytes.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Varchar2 :&lt;/span&gt;&lt;/strong&gt; This data type is used to store variable length character data. Max. Allowed Size for varchar2 is 2000 bytes. Difference between char and varchar2 is if we specify the datattype as char(10) and stored the string “Oracle” then even the given string contains 6 characters it occupies 10 bytes in memory by placing blank spaces towards the  end. if we specify the datatype as varchar2(10) then it occupies only 6 bytes even max. size is 10.&lt;br /&gt;Long : This data type is used to store variable length character data up to 2 GB.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Raw :&lt;/strong&gt;&lt;/span&gt; This data type is used to store binary data up to 1000 bytes. Binary data means pictures and sounds.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;Long Raw :&lt;/span&gt;&lt;/strong&gt; This data type is used to store binary data up to 2 GB.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Date :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;This data type is used to store dates in a column. Default Date format in Oracle is DD – MON – YY (Ex: 12-AUG-02).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-2477027774711790821?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/2477027774711790821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=2477027774711790821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/2477027774711790821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/2477027774711790821'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/sql-introduction-and-data-types.html' title='SQL Introduction and Data Types'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-8457350113086554561</id><published>2008-07-28T22:01:00.000-07:00</published><updated>2008-07-28T22:02:35.517-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>CONSTRAINTS</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Constraints In O R A C L E&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Constraints are nothing but conditions given on a column to maintain data integrity within the database. A constraint clause can constrain a single column or group of columns in a table. The point of these constraints is to get oracle to do most of the work in maintaining the integrity of your database. The more constraints you add to a table definition, the less work you have to do in applications to maintain the data. On the other hand, the more constraints there are in a table, the longer it takes to update the data.&lt;br /&gt;There are two ways to specify constraints. As part of the column definition (a column constraint) or at the end of the create table statement (a table constraint). Clauses that constrain several columns must be table constraints. Constraints in Oracle and their purpose are as follows.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. Not Null :&lt;/strong&gt; This constraint is used to restrict the user from inserting null values into a column.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Unique :&lt;/strong&gt; This constraint is used to restrict the user from inserting duplicate values to a column.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Primary Key :&lt;/strong&gt; This constraint is used to restrict the user from inserting duplicate values or null values into a column. Another purpose of Primary Key is a column to be referenced by a Foreign Key must be a Primary Key. Oracle allows only one primary key for the table.&lt;br /&gt; &lt;br /&gt;&lt;strong&gt;4. Foreign Key :&lt;/strong&gt; This constraint is used to create relationship between two tables. We create relationship between two tables by giving reference to a primary key column of one table to a column in second table, which is called foreign key column. Foreign Key constraint allows either null values or the values present in a Primary Key column to which it refers.&lt;br /&gt;            When a relationship is created between two tables then the table that contains Primary Key is called as Master or parent Table and the table that contains Foreign Key is called as Detailed or child Table and the Primary Key and Foreign Key relationship is called as Master Detail Relationship.&lt;br /&gt;            A Foreign Key constraint is also called as Referential Integrity constraint. If a Foreign Key refers to a Primary Key present in the same table then that foreign key is called as Self Referential Key.&lt;br /&gt;            The clause on delete cascade added to the references clause tells oracle to delete the dependent row when you delete the corresponding row in the parent table. This action automatically maintaince referential integrity.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5. Check :&lt;/strong&gt; Many columns must have values that are within a certain range or that satisfy certain conditions. A column level check constraint can’t refer to values in other rows. It can’t use the pseudo columns sysdate, uid, user, userenv, currval, nextval, level or rownum. You can use the table constraint form to refer to multiple columns in a check constraint.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-8457350113086554561?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/8457350113086554561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=8457350113086554561' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/8457350113086554561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/8457350113086554561'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/constraints.html' title='CONSTRAINTS'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-3861584756144857149</id><published>2008-07-28T21:57:00.000-07:00</published><updated>2008-07-28T22:00:50.587-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>CREATING TABLE, TABLE LEVEL CONSTRAINT</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Creating A Table&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To create your own table in oracle, “Create Table” command is used. Create Table command has the following syntax.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create Table TabName&lt;br /&gt;            (col1 datatype [constraint constname] [constspec],&lt;br /&gt; col2 datatype [constraint constname] [constspec],&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt; coln datatype [constraint constname] [constspec]&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;                        Here Col1, Col2, … , Coln are the column names to be included in the table. Datatype is any valid datatype of SQL. Constraint is keyword. Constname is the name for the constraint specifying on that column. Constspec is the constraint to be given on that column. Specifying constraint name is optional. When you want to give a name to the constraint, then only you have to use the key word constraint. If we don’t specify a name to the constraint, then oracle will automatically give a name to that constraint. You can get the constraint names from data dictionary view user_constraints. Most of oracle’s generated constraint names are of the form SYS_C######. For example, SYS_C000145. Even specifying a constraint on a column is also optional.&lt;br /&gt;                        These are the basic elements of this command.&lt;br /&gt;The words create table&lt;br /&gt;The name of the table&lt;br /&gt;An opening paranthesis&lt;br /&gt;Column definitions&lt;br /&gt;A closing paranthesis&lt;br /&gt;A SQL terminator&lt;br /&gt;&lt;br /&gt;The individual column definitions are separated by commas. There is no comma after the last column definition. The table and column names must start with a letter of the alphabet, but may include letters, numbers, and underscores. Names may be 1 to 30 characters in length, must be unique within the table, and can not be an oracle reserved word.&lt;br /&gt;Example :&lt;br /&gt;&lt;br /&gt;            Create Table STUDENT&lt;br /&gt;(Sno Number(5) constraint SNO_PK Primary Key,&lt;br /&gt;Sname Varchar2(15) NOT NULL,&lt;br /&gt;            Address Varchar2(20) NOT NULL,&lt;br /&gt;            Course Varchar2(1) NOT NULL,&lt;br /&gt;            Fee Number(7,2)&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;&lt;br /&gt;            Create table Marks&lt;br /&gt;(Sno Number(5) constraint SNO_FK references Student(Sno),&lt;br /&gt;            M1 Number(3) constraint M1_CHK Check(M1&lt;=100),&lt;br /&gt;            M2 Number(3) constraint M2_CHK Check(M2&lt;=100),&lt;br /&gt;M3 Number(3) constraint Mn_CHK Check(M3&lt;=100),&lt;br /&gt;            Total Number(5),&lt;br /&gt;Aveg Number(7,2)&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;strong&gt;&lt;span style="font-size:130%;"&gt;Table Level Constraints&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;                        Constraints can be classified into column level constraints and table level constraints. If constraint was specified immediately after column definition then that constraint is called as column level constraint and if a constraint was specified at the end of the create table statement, then that constraint is called as table level constraint. Table level constraints are generally used when constraint has to be given on more than one column. An example of table level constraint is as follows. In this example, primary key constraint is given on two columns invno and itemno.&lt;br /&gt;&lt;br /&gt;            Create table Invoice&lt;br /&gt;            (Invno number(5) ,&lt;br /&gt;            Cname varchar2(20) not null,&lt;br /&gt;            Itemno number(5),&lt;br /&gt;            Qty number(3) not null,&lt;br /&gt;            Uprice number(7,2) not null,&lt;br /&gt;            Constraint invitem_pk primary key(invno,itemno)&lt;br /&gt;            );&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Creating a Table From Another Table&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To create a new table from an existing table, the following syntax is used.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Syntax :&lt;/strong&gt; create table tablename as select statement on the source table;&lt;br /&gt;Example : the following example creates emp1 by selecting the structure and rows of emp table.&lt;br /&gt;&lt;br /&gt;            Create table Emp1 as select * from emp;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Displaying Structure of The Table&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To display the structure of a table i.e. the column names and their data types, describe command is used.&lt;br /&gt;&lt;br /&gt;Syntax : DESC TableName&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-3861584756144857149?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/3861584756144857149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=3861584756144857149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/3861584756144857149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/3861584756144857149'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/creating-table-table-level-constraint.html' title='CREATING TABLE, TABLE LEVEL CONSTRAINT'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-175911063004241004</id><published>2008-07-28T21:52:00.000-07:00</published><updated>2008-07-28T21:57:37.671-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>INSERTING DATA INTO TABLE</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Using Merge Command&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;  &lt;/strong&gt;As of oracle9i, you can use the merge command to perform inserts and updates in to a single table in a single command. Based on the conditions you specify, oracle will take the source data i.e. a table, view, or a query and update existing values if the conditions are met. If the conditions are not met, the row will be inserted.&lt;br /&gt; &lt;br /&gt;For example, create a duplicate table of emp with name emp1 and make some changes to emp1. now we can merge the changes made to emp1 in to emp by using merge command as follows.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Merge Into Emp EUsing&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;(Select Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno From Emp1) E2On(E.Empno=E2.Empno)&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;When Matched Then      &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Update Set E.Sal=E2.Sal,E.Comm=E2.CommWhen Not Matched Then Insert values(E2.Empno,E2.Ename,E2.Job,E2.Mgr,E2.Hiredate,E2.Sal,E2.Comm,E2.Deptno)&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Inserting Data Into A Table&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After creating the table we can insert data into that table by using insert statement. Insert statement has following syntaxes.&lt;br /&gt;&lt;br /&gt;Syntax 1: Insert into tabname values( val1, val2, val3, . . . , val n );&lt;br /&gt;Example: Insert into Student values( 1, ‘SAI’, ‘Apet’, ‘ORACLE’, 2000);&lt;br /&gt;&lt;br /&gt;Syntax 2: Insert into tabname values( &amp;amp;col1, &amp;amp;col2, &amp;amp;col3, . . . , &amp;amp;co n );&lt;br /&gt;Example : Insert into Student values( &amp;amp;Sno, ‘&amp;amp;Sname’, ‘&amp;amp;Address’, &amp;amp;Fee );&lt;br /&gt;&lt;br /&gt;Second syntax will be easier for user when he/she has to insert serveral rows in to the table. By using above two syntaxes we must provide values for all columns of the table even columns don’t have ‘Not Null’ constraint. To insert data into a table by excluding some columns, the following syntaxes are used.&lt;br /&gt;&lt;br /&gt;Syntax 3: Insert into tablename(Col1, Col2, Col3,. . .,Col n) values ( Val1, Val2, Val3, . . . ,Val n);&lt;br /&gt;Example: Insert into Marks ( Sno, M1, M2, M3 ) values ( 1, 55, 67, 82 );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Syntax 4: Insert into tablename (Col1, Col2, Col3, ..., Col n) values (‘&amp;amp;Col1’, ‘&amp;amp;Col2’, ‘&amp;amp;Col3’, ... , ‘&amp;amp;Col n’);&lt;br /&gt;Example: Insert into Marks (Sno, M1, M2, M3) values (&amp;amp;sno,&amp;amp;m1,&amp;amp;m2,&amp;amp;m3);&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Insert With Select&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You also can insert information that has been selected from a table.&lt;br /&gt;&lt;br /&gt;Syntax : Insert into Tablename select col1, col2, col3, … , col n from tablename;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Using Append Hint&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Oracle uses an optimizer to determine the most efficient way to perform each SQL command. For insert statements, oracle tries to insert each new record into an existing block of data already allocated to the table. This execution plan optimizes the use of space required to store the data. However, it may not provide adequate performance for an insert with a select command that inserts multiple rows.you can override the execution plan by using the append hint to improve the performance of large inserts.the append hint will tell the database to find the last block into which the table’s data has ever been inserted. The new records will be inserted starting in the next block following the last previously used block. Since the data is being written into new blocks of the table, there is much less space management work for the database to do during the insert. Therefore, the insert may complete faster when the append hint is used.&lt;br /&gt;&lt;br /&gt;You specify the append hint within the insert command. A hint looks like a comment. It starts with /* and ends with */. The only difference is that the starting set of characters includes a + before the name of the hint.&lt;br /&gt;&lt;br /&gt;Syntax : insert /* + APPEND */ in to tablename select statement.&lt;br /&gt;&lt;br /&gt;Since the new records will not attempt to reuse available space that the table has already used, the space requirements for the table may increase. In general you should use the append hint only when inserting large volumes of data in to tables with little reusable space. The point at which appended records will be inserted is called the table’s high-water mark.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;Multitable Inserts&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;As of oracle 9i, you can perform multiple inserts in a single command. You can perform all of the inserts unconditionally or you can spcify conditions using a when clause to tell oracle how to manage the multiple inserts. If you specify all, then all of the when clauses will be evaluated. Specifying first tells oracle o skip subsequent when clauses after it finds one that is true for the row being evaluated. You can also use an else clause to tell oracle what to do if none of the when clauses evaluates to true.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Syntax : Insert [ALL] / [FIRST]&lt;br /&gt;[When condition]&lt;br /&gt;Into tablename values(val1, val2, …, val n)&lt;br /&gt;[When condition]&lt;br /&gt;Into tablename values(val1, val2, …, val n)&lt;br /&gt;[When condition]&lt;br /&gt;Into tablename values(val1, val2, …, val n)&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;else&lt;br /&gt;Into tablename values(val1, val2, …, val n)&lt;br /&gt;Select statement;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-175911063004241004?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/175911063004241004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=175911063004241004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/175911063004241004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/175911063004241004'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/inserting-data-into-table.html' title='INSERTING DATA INTO TABLE'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-698348764863365730</id><published>2008-07-28T21:51:00.000-07:00</published><updated>2008-07-28T21:52:23.550-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>UPDATE COMMAND</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Updating A Table&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To make modifications to the data present in a table, update statement is used. Update statement has the following syntax.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Syntax:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Update tablename set Col1=Val1, Col2=Val2, ... ,Col n=Val n [ Where Condition ];&lt;br /&gt;&lt;br /&gt;Example 1:&lt;br /&gt; The following update statement changes the name of student with id 3 to ‘NAVEEN’.&lt;br /&gt;Update Student set Sname=’Naveen’ where Sno=3;&lt;br /&gt;&lt;br /&gt;Example 2: The following example updates the Marks table by calculating total and average.&lt;br /&gt;Update Marks set Total= (M1 + M2 + M3 ), Aveg = ( M1 + M2 + M3 ) / 3;&lt;br /&gt;&lt;br /&gt;            If you specify the where clause, then the rows that satisfy the given codition in where clause will only be updated. If you omit the where clause then all rows of the table will be updated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-698348764863365730?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/698348764863365730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=698348764863365730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/698348764863365730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/698348764863365730'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/update-command.html' title='UPDATE COMMAND'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-5737068203334869529</id><published>2008-07-28T21:49:00.000-07:00</published><updated>2008-07-28T21:50:37.271-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>RENAME, DELETE and TRUNCATE</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Renaming a Table&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;                        Name of a table can be chaged by using Rename command. Rename command has the following syntax.&lt;br /&gt;&lt;br /&gt;Syntax: Rename Oldname to Newname;&lt;br /&gt;Example: The following example changes the name of student table to stu.&lt;br /&gt;            Rename Student to Stu;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;br /&gt;&lt;strong&gt;Deleting a Table&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                        A table can be deleted by using Drop Table command. Drop Table command has the following syntax.&lt;br /&gt;&lt;br /&gt;Syntax: Drop Table Tablename;&lt;br /&gt;Example: The following example deletes marks table.&lt;br /&gt;            Drop Table Marks;&lt;br /&gt;&lt;br /&gt;                      &lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;TRUNCATE&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; In oracle, the truncate command lets you remove all the rows in the table and reclaim the space for other uses without removing the table definition from the database.&lt;br /&gt;&lt;br /&gt;Syntax: Truncate Table Tablename;&lt;br /&gt;&lt;br /&gt;Example: The following example deletes all rows in marks table, keeping marks table definition within the database.&lt;br /&gt;&lt;br /&gt;            Truncate Table Marks;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-5737068203334869529?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/5737068203334869529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=5737068203334869529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5737068203334869529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5737068203334869529'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/rename-delete-and-truncate.html' title='RENAME, DELETE and TRUNCATE'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-6939717885951228887</id><published>2008-07-28T21:42:00.000-07:00</published><updated>2008-07-28T21:48:01.202-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>ALTER COMMAND</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Altering A Table Structure&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After creating the table we can change the data type of a column or change the size of a column or add a new constraint or delete a constraint or add a new column or delete a column by using Alter Table command. Syntaxes of Alter table command are as follows.&lt;br /&gt;&lt;br /&gt;To change the datatype of a column or to change the size of a column or to add not null constraint to a column, the following syntax is used.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Syntax:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Alter table tablename modify&lt;br /&gt;(Col1 Datatype Not Null,&lt;br /&gt;Col2 Datatype Not Null,&lt;br /&gt;………..&lt;br /&gt;Col n Datatype Not Null&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;Example : The following example increases the size of Sname column in Student table to 20 and adds not null constraint to fee column.&lt;br /&gt;Alter table Student modify (Sname varchar2(20), Fee number(7,2) Not Null );&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Restrictions:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Changing the datatype of a column is not possible if that column contains data.&lt;br /&gt;Adding not null constraint is not possible if that column contains NULL values.&lt;br /&gt;Decreasing the Size of a column is not possible if that column contains data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;To add a new column to the table, the following syntax is used.&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Syntax:&lt;/strong&gt;&lt;br /&gt;Alter table tabname ADD&lt;br /&gt;(Col1 Datatype Constraint Consname Consspec,&lt;br /&gt;Col2 Datatype Constraint Consname Consspec,&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;Col n Datatype Constraint Consname Consspec);&lt;br /&gt;&lt;br /&gt;Example : The following example adds a new column with name Fname (Father’s name) to Student table.&lt;br /&gt;&lt;br /&gt;Alter table Student ADD (Fname Varchar2(10));&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Restrictions :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;a)      Adding a column with primary key or Not Null constraint is not possible if the table contains data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;To add a constraint to a table, the following syntax is used.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Syntax:&lt;/strong&gt;&lt;br /&gt;Alter table tabname ADD Constraint consname consspec( Colname );&lt;br /&gt;&lt;br /&gt;Example 1: The following example adds Primary Key constraint to Sno Column of Student table.&lt;br /&gt;Alter table Student ADD constraint Sno_PK Primary Key (Sno);&lt;br /&gt;&lt;br /&gt;Example 2: The following example adds Foreign Key constraint to Sno Column of Marks table.&lt;br /&gt;Alter table Marks ADD constraint Sno_FK Foreign Key (Sno) references Student(Sno);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Restrictions:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Adding any constraint to a column is not possible if that column contains data that violates that constraint.&lt;br /&gt;Adding Not Null constraint is not possible by using this syntax.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;To disable and enable constraints, the following syntax is used.&lt;/span&gt;&lt;br /&gt;Syntax:&lt;/strong&gt;&lt;br /&gt;Alter table tabname Disable/Enable constraint consname;&lt;br /&gt;&lt;br /&gt;Example: The following example disables the foreign key constraint on Sno column of Marks table.&lt;br /&gt;Alter table Marks Disable constraint Sno_FK;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Restrictions:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Disabling a primary key is not possible if that Primary key is refered by a foreign key. To delete primary key by deleting the foreign key constraint automatically, we have to use cascade constraints clause at the end of the alter table command.&lt;br /&gt;Enabling a constraint is not possible if that column contains data that violates the constraint.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;To delete a constraint or a column, the following syntax is used.&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Syntax:&lt;/strong&gt;&lt;br /&gt;Alter table tabname Drop Column/Constraint Col.Name/ConsName;&lt;br /&gt;&lt;br /&gt;Example 1: The following example deletes Foreign Key constraint on Sno column of Marks table.&lt;br /&gt;Alter table Marks Drop constraint Sno_FK;&lt;br /&gt;&lt;br /&gt;Example 2: The following example deletes Fee column from Student table.&lt;br /&gt;Alter table Student Drop Column Fee;&lt;br /&gt;&lt;br /&gt;Example 2: The following example deletes Fee, Fname columns from Student table in a sinle alter table statement.&lt;br /&gt;Alter table Student Drop (Fee, Fname);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Restrictions:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Deleting a Primary key constraint or primary key column is not possible if that Primary key is refered by a Foreign Key. To delete primary key column by deleting the foreign key constraint automatically, we have to use cascade constraints clause at the end of the alter table command.&lt;br /&gt;&lt;br /&gt;We can make a column as unused. Making a column unused does not release the space previously used by the column until you drop the unused columns.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Syntax:&lt;br /&gt;&lt;/strong&gt;Alter table tabname set unused column ColumnName;&lt;br /&gt;&lt;br /&gt;Example : The following example sets total column of marks table unused.&lt;br /&gt;Alter table Marks set unused column total;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To delete all unused columns of a table, drop unused columns clause is used as follows.&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt; Example : Alter table Marks drop unused columns;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-6939717885951228887?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/6939717885951228887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=6939717885951228887' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/6939717885951228887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/6939717885951228887'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/alter-command.html' title='ALTER COMMAND'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-3959139107575680751</id><published>2008-07-28T21:40:00.000-07:00</published><updated>2008-07-28T21:41:46.030-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>OPERATORS</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;O p e r a t o r s&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The following operators can be used in the where clause to simplify the conditions.&lt;br /&gt;&lt;br /&gt;Between … And                   &lt;br /&gt;In                    &lt;br /&gt;Like                &lt;br /&gt;Is Null&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;1)      Between … And:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This operator is used to test whether the given value is present in given range of values.&lt;br /&gt; &lt;br /&gt;Examples:&lt;br /&gt;Find all employees whose Salary is more than 2000 and less than 4000.&lt;br /&gt;Select * from EMP where Sal between 2000 and 4000;&lt;br /&gt;Find all employees joined after 12 th june 1990, and before 31st December 1990.&lt;br /&gt;Select * from EMP where Hiredate between ‘12-Jun-90’ and ‘31-Dec-90’;&lt;br /&gt;Find all employees who are not joined after 12th June 1990, and before 31st December 1990.&lt;br /&gt;Select * from EMP where Hiredate NOT Between ‘12-Jun-90’ and ‘31-Dec-90’;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;2)      In :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This operator is used to test whether the given value is present in a given list of values.&lt;br /&gt;&lt;br /&gt;Examples:&lt;br /&gt;Find all employees whose salary is either 1200 or 1500 or 1750.&lt;br /&gt;Select * from EMP where Sal IN (1200, 1500, 1750);&lt;br /&gt;Find all employees who are working either as a Manager or a Clerk.&lt;br /&gt;Select * from EMP where Job IN (‘MANAGER’, ‘CLERK’);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;3)      Like:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; One of the most powerful features of SQL is a marvelous pattern-matching operator called LIKE, which is able to search through the rows of a database column for values that look like a pattern you describe. It uses two special characters to denote which kind of matching to do : a percent sign, called wildcard, and an underscore, called position marker.&lt;br /&gt;&lt;br /&gt;Examples:&lt;br /&gt;Find all employees whose Name starts with ‘S’.&lt;br /&gt;Select * from EMP where Ename LIKE ‘S%’;&lt;br /&gt;Find all employees whose name ends with ‘E’.&lt;br /&gt;Select * from EMP where Ename LIKE ‘%E’;&lt;br /&gt;Find all employees whose name contains the letter ‘A’.&lt;br /&gt;Select * from EMP where Ename LIKE ‘%A%’ ;&lt;br /&gt;Find all employees whose name contains ‘L’ as second letter.&lt;br /&gt;Select * from EMP where Ename LIKE ‘_L%’ ;&lt;br /&gt;Find all employees whose name doesn’t contain the letter ‘A’.&lt;br /&gt;Select * from EMP where Ename NOT LIKE ‘%A%’;&lt;br /&gt;Find all employees whose name contains five letters.&lt;br /&gt;Select * from EMP where Ename like ‘_ _ _ _ _’; (Underscores without space between them)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;4)      Is Null:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This operator is used to test for a null value in the given column.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Examples:&lt;br /&gt;Find all employees who are not drawing any commission.&lt;br /&gt;Select * from EMP where Comm IS NULL;&lt;br /&gt;Find all employees who are drawing Commission.&lt;br /&gt;Select * from EMP where Comm IS NOT NULL;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-3959139107575680751?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/3959139107575680751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=3959139107575680751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/3959139107575680751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/3959139107575680751'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/operators.html' title='OPERATORS'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-7605303439387043131</id><published>2008-07-28T21:35:00.001-07:00</published><updated>2008-09-09T21:50:50.071-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>BUILT IN FUNCTIONS IN ORACLE</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Built In Functions&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;As in other programming languages, SQL also provides built in functions. Built in functions in SQL are classified into following categories.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Single row functions.&lt;br /&gt;List Functions.&lt;br /&gt;Group Functions.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;1)      Single Row Functions:&lt;/span&gt; The Built in functions of ORACLE that work on each row of the table separately are called as Single Row Functions. Depending on the data type of the values on which Single Row Functions work, they are classified into following five categories.&lt;br /&gt;&lt;br /&gt;Character Functions.&lt;br /&gt;Numeric Functions.&lt;br /&gt;Conversion Functions&lt;br /&gt;Date Functions.&lt;br /&gt;Special Functions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Character Functions :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; Built in Single Row Functions of SQL that work on character type of data are called as Character functions. Character functions in SQL are as follows.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;UPPER(String or ColName) : This function converts the given string or values of given column in any case to upper case.&lt;br /&gt;&lt;br /&gt;LOWER(String or ColName) : This function converts the given string or values of given column in any case to lower case.&lt;br /&gt;&lt;br /&gt;INITCAP(String or ColName) : This function converts the given string or values of given column in any case to title case i.e. converts first character in every word to upper case and remaining characters in the word to lower case.&lt;br /&gt;&lt;br /&gt;In general above three functions are used to perform case-insensitive queries against database. For example the following query retrieves all managers from emp table with case insensitivity.&lt;br /&gt;&lt;br /&gt;Example: Select * from EMP where UPPER(JOB) = ‘MANAGER’;&lt;br /&gt;&lt;br /&gt;LPAD(String or Colname, Len, Char ) : This function pads the given char with in the blank spaces to the left of given string or values of given column by assuming the maximum length of string or column as Len.&lt;br /&gt;&lt;br /&gt;Following example pads “*” to the left of employee name. In this example, colname is ename, len is given as 10 and char as “*”. Now if ename is “Scott” then ename is five charcaters and we have given the len as 10. Hence it pads five “*” to the left of ename “scott” and result is “*****Scott”.&lt;br /&gt;&lt;br /&gt;Example: Select Lpad(Ename,10,”*”) from Emp;&lt;br /&gt;&lt;br /&gt;RPAD(String, Len, Char ) : This function pads the given char with in the blank spaces to the Right of given string or values of given column by assuming the maximum length of string or column as Len.&lt;br /&gt;&lt;br /&gt;Following example pads “*” to the right of employee name. In this example, colname is ename, len is given as 10 and char as “*”. Now if ename is “Scott” then ename has five charcaters and we have given the len as 10. Hence it pads five “*” to the right of ename “scott” and result is “Scott*****”.&lt;br /&gt;&lt;br /&gt;Example: Select Lpad(Ename,10,”*”) from Emp;&lt;br /&gt;&lt;br /&gt;LTRIM(String or ColName,[Char]) : Removes any leading blank spaces i.e. blank spaces on left of given string or values of given column if char is omitted. Otherwise removes the given char from left of given string or values of given column.&lt;br /&gt;&lt;br /&gt;RTRIM(String or ColName,[Char]) : Removes any trailing blank spaces i.e. blank spaces on right of given string or values of given column if char is omitted. Otherwise removes the given char from right of given string or values of given column.&lt;br /&gt;&lt;br /&gt;LENGTH(String or ColName) : Returns the number of characters in the given string or values of given column seperately.&lt;br /&gt;&lt;br /&gt;SUBSTR(String or ColName, M, [N] ) : This function extracts ‘ N ’ number of characters from the given string or values of given column starting from ‘ M ’. If ‘ N ‘ is omitted then all charcters starting from ‘ M ‘ will be retrieved.&lt;br /&gt;&lt;br /&gt;Example: Select Substr(‘ORACLE CORPORATION’, 8, 4 ) from Dual;&lt;br /&gt;&lt;br /&gt;This example returns “CORP” by extracting 4 characters from the given string “ORACLE CORPORATION” starting from the 8th character. If same query is written without giving value 4, then result will be “CORPORATION”.&lt;br /&gt;&lt;br /&gt;INSTR(String or ColName, Substring, M, N ) : Finds Nth occurrence of the given substring with in the given string or values of given column starting from ‘M’.&lt;br /&gt;&lt;br /&gt;Example: Select INSTR( ‘ORACLE CORPORATION’, ‘OR’, 1, 2 ) from Dual; &lt;br /&gt;&lt;br /&gt;This example returns value 9. Because given substring “OR” is started second time at 9th character starting from first(1) character. If the same query is written as follows&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example: Select INSTR( ‘ORACLE CORPORATION’, ‘OR’, 9, 2 ) from Dual; &lt;br /&gt;&lt;br /&gt;Then return value is 12. Because given substring “OR” is started second time at 12th character starting from 9th character. If the given substring is not found in the specified ocuurrece, then this function will return the value 0.&lt;br /&gt;&lt;br /&gt;REPLACE(String or ColName, Substring, [RepString] ) : Replaces every occurrence of given substring with in the given string or values of given column with Repstring.&lt;br /&gt;&lt;br /&gt;Example: Select REPLACE( ‘ORACLE CORPORATION’, ‘ORA’, ‘X’ ) from Dual;&lt;br /&gt;This example will replace every occurrence of given substring “ORA” in the given string “ORACLE CORPORATION” with given replace string “X”  and the result will be “XCLE CORPXTION”. If Replace string is omitted, then the given substring will be removed from the given string or values of given column. If replace string “X” is not given in the above example, then result will be “CLE CORPTION”.&lt;br /&gt;&lt;br /&gt;12.) TRANSLATE(String or ColName, substring, RepString ) : Replaces every occurrence of individual characters in the given substring within given string or values of given column with corresponding character in the replace string.&lt;br /&gt;&lt;br /&gt;Example: Select Translate( ‘ORACLE CORPORATION’, ‘ORA’, ‘XYZ’ ) from Dual;&lt;br /&gt;&lt;br /&gt; This example will replace every occurrence of given characters in the substring “ORA” in the given string “ORACLE CORPORATION” with given charcters in replace string “XYZ”. I.e. Character “O” is replaced with “X”, “R” is replced with “Y” and “A” is replaced with “Z” and the result will be “XYZCLE CXYPXYZTIXN”. If corrosponding charcter in Replace string for a charcater in substring is omitted, then the given charcter in substring will be removed from the given string or values of given column. If replace string “XYZ” is given as “XY” in the above example, then result will be “XYCLE CXYPXYTION”.&lt;br /&gt;&lt;br /&gt;CONCAT(String1 or Col1, String2 or Col2) : Concatenates String2 or Col2 at the end of String1 or Col1. Instead of concat function, we can use the Concatenation operator  “”(Double Pipe Symbol”).&lt;br /&gt;&lt;br /&gt; SOUNDEX(String or ColName) : Returns how the given string or values of given column are pronounced. The following example retrives the employee records, whose name pronounces same as “SKOTT”.&lt;br /&gt;&lt;br /&gt;Example: Select * from EMP where SOUNDEX(Ename) = SOUNDEX(‘SKOTT’);&lt;br /&gt;&lt;br /&gt;ASCII(Char) : Returns ASCII value of given character.&lt;br /&gt;&lt;br /&gt;Example: Select Ascii(‘A’) from Dual;  ( Returns 65 )&lt;br /&gt;&lt;br /&gt;Chr(N) : Returns ascii character for given ‘N’.&lt;br /&gt;&lt;br /&gt;Example: Select Chr(65) from Dual;   ( Returns “A” )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;ii.) NUMERIC FUNCTIONS :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Built in single row functions of SQL that work on numeric type of data are called as numeric functions. Numeric functions in SQL are as follows.&lt;br /&gt;&lt;br /&gt;Sin(n) : Returns Sine value of given ‘ n ‘ in Radians.&lt;br /&gt;ASin(n) : Returns Arc Sine value of given ‘ n ‘ in Radians.&lt;br /&gt;3.  SinH(n) : Returns Hyperbolic Sine value of given ‘ n ‘ in Radians.&lt;br /&gt;4.  Cos(n) : Returns Co Sine value of given ‘ n ‘ in Radians.&lt;br /&gt;5.  ACos(n) : Returns Arc Co Sine value of given ‘ n ‘ in Radians.&lt;br /&gt;6.  CosH(n) : Returns Hyperbolic Co Sine value of given ‘ n ‘ in Radians.&lt;br /&gt;7.  Tan(n) : Returns Tangent value of given ‘ n ‘ in Radians.&lt;br /&gt;8.  Atan(n) : Returns Arc Tangent value of given ‘ n ‘ in Radians.&lt;br /&gt;9.  TanH(n) : Returns Hyperbolic Tangent value of ‘ n ‘ in Radians.&lt;br /&gt;10. ABS(n) : Returns absolute value of given ‘ n ’. i.e., without any sign.&lt;br /&gt;            Following example returns 8 by removing “-“ sign.&lt;br /&gt;&lt;br /&gt;Example : Select Abs(-8) from Dual;&lt;br /&gt;&lt;br /&gt;11.Exp(n) : Returns ‘ e ’ value raised to the power of ‘ n ’. ‘ e ‘ is exponentiation and its value is 2.718.&lt;br /&gt;            Following example returns (2.718)3&lt;br /&gt;&lt;br /&gt;Example : Select Exp(3) from Dual;&lt;br /&gt;&lt;br /&gt;12.Ceil(n) : Returns the smallest integer among all the values that are greater than given ‘n‘&lt;br /&gt;            In the following example, ‘ n ‘ is given as 4.721. Here integers greater than 4.721 will be 5,6,7, and so on. Hence it returns 5, the smallest integer among all values that are greater than 4.721.&lt;br /&gt;&lt;br /&gt;Example: Select CEIL(4.721) from Dual; &lt;br /&gt;13. Floor(n) : Returns the largest integer among all the numbers that are less than ‘ n ‘.&lt;br /&gt;                        In the following example, ‘ n ‘ is given as 4.721. Here integers less than 4.721 will be 1,2,3, and 4. Hence it returns 4, the largest integer among all values that are less than 4.721.&lt;br /&gt;&lt;br /&gt;Example: Select Floor(4.721) from Dual; &lt;br /&gt;&lt;br /&gt;14. LN(n) : It returns Natural Logarithmic value of ‘ n ‘.&lt;br /&gt;15. LOG(M,N) : It returns base M logarithmic value of given N. &lt;br /&gt;            Following example returns Log2(8) i.e. base 2 logorithmic value of 8.&lt;br /&gt;&lt;br /&gt;Example : Select Log(2,8) from Dual;&lt;br /&gt;&lt;br /&gt;16. MOD(M,N) : Returns the remainder after integer division of M with N.   &lt;br /&gt;            Following example returns 2. Integer division of 7 with 5 will result 1 and remainder will be 2.&lt;br /&gt;Example : Select Mod(7,5) from Dual;&lt;br /&gt;&lt;br /&gt;17. SQRT(N) : Returns Square root value of given ‘ N ’.&lt;br /&gt;            Following example will return 5 as square root of 25 is 5.&lt;br /&gt;&lt;br /&gt;Example : Select Sqrt(25) from Dual;&lt;br /&gt;&lt;br /&gt;18. POWER(M,N) : Returns the value of ‘ M ’ raised to the power of ‘ N ’ i.e.  MN&lt;br /&gt;            Following example returns 125 i.e. 53.&lt;br /&gt;Example : Select Power(5,3) from Dual;&lt;br /&gt;19. ROUND(N,P) : Rounds the given ‘ N ‘ value to ‘ P ‘ decimal places.&lt;br /&gt;            Following example returns 7.64 by rounding 7.6351 to 2 decimal places. Round function increments the value 7.63 to 7.64. Because immediate next digit of 3 is greater than or equal to 5.&lt;br /&gt;&lt;br /&gt;Example : Select ROUND(7.6351, 2 ) from Dual; &lt;br /&gt;&lt;br /&gt;20. TRUNC(N,P) : Truncates the given ‘ N ’  value to ‘ P ‘ decimal places.&lt;br /&gt;                        Following example returns 7.63 by truncating 7.6351 to 2 decimal places. Truncate function Does not increment the value 7.63 to 7.64 even immediate next digit of 3 is greater than or equal to 5.&lt;br /&gt;&lt;br /&gt;Example : Select Truncate(7.6351, 2 ) from Dual; &lt;br /&gt;           &lt;br /&gt;21. SIGN(N) : Returns –1 if the ‘ N’ value is negative, 0 ( Zero ) if the ‘ N ‘ value is Zero and +1 if ‘ N ‘ is positive.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;iii) CONVERSION FUNCTIONS :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Built in single row functions of SQL that are used to convert one type of data to another are called as conversion function. Conversion functions in SQL are as follows.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TO_CHAR(n) : Converts the given numeric value to character format.&lt;br /&gt;Following example converts the given numeric value 14 to character format i.e. “14”&lt;br /&gt;&lt;br /&gt;Example : Select To_Char(14) from Dual;&lt;br /&gt;&lt;br /&gt;2. TO_NUMBER(Char) : Coverts the numeric value in character format to Numeric format.&lt;br /&gt;            Following example converts the given numeric value 14 in charcater format i.e. “14” to numeric format i.e. 14&lt;br /&gt;&lt;br /&gt;Example : Select To_Number(‘14’) from Dual;&lt;br /&gt;&lt;br /&gt;TO_CHAR(Date, Format) : Converts given Date to Character format by using the specified format.&lt;br /&gt;Following example converts the system date to DD-MONTH-YYYY format. If we assume the system date as ‘5-jan-02’ then result will be ‘05-JANUARY-2002’.&lt;br /&gt;Example : Select To_Char(Sysdate, ‘DD-MONTH-YYYY’) from Dual;&lt;br /&gt;Strings that can be used to specify the format and their purpose are as follows&lt;br /&gt;1. D                 : Returns Day of week.&lt;br /&gt;2. DD               : Returns Day of Month.&lt;br /&gt;3. DDD            : Returns Day of Year.&lt;br /&gt;4. DY               : Abbrivative form of week.&lt;br /&gt;5. DAY             : Complete spelling of week. ( Ex: Sunday, Monday, …)&lt;br /&gt;6. SP               : Complete spelling of dates (Fourteen).&lt;br /&gt;7. TH               : Places ‘Th’ or ‘St’ or ‘Rd’ at the end of day.(3rd, 2nd , 4th etc)&lt;br /&gt;8. MM              : Two digital months. ( 01, 02, 02,…12 )&lt;br /&gt;9. MON           : Abbrivative form of Month.&lt;br /&gt;10. RM                        : Roman numerical month. ( i, ii, iii, iv, v,…, XII )&lt;br /&gt;11. MONTH    : Complete Spelling of month. ( January, …, December )&lt;br /&gt;12. Y                : Last digit of the year.&lt;br /&gt;13. YY             : Last two digits of year.&lt;br /&gt;14. YYY           : Last three digits of year.&lt;br /&gt;15. YYYY        : 4 Digital year.&lt;br /&gt;16. YEAR        : Year spelled out.&lt;br /&gt;17. HH / HH12  : Hour of day in 12-hour format.&lt;br /&gt;18. HH24         : Hour of day in 24-hour format.&lt;br /&gt;19. MI              : Minute of year.&lt;br /&gt;20. SS             : Second of minute.&lt;br /&gt;21. AM / PM    : Represents AM or PM.&lt;br /&gt;22. WW            : Returns week of YEAR.&lt;br /&gt;&lt;br /&gt;TO_DATE(CharDate, Format) : Converts the given date in character format to Date. This function has two arguments. First argument is the date in character format and second one is the format of date, which we have given, in first argument.&lt;br /&gt;Following example converts the given date in character format ‘Fourteen-August-2002’ to date format i.e. 14-Aug-02.&lt;br /&gt;&lt;br /&gt;Example : Select TO_DATE(‘Fourteen-August-2002’, ‘DDSP-MONTH-YYYY’) from Dual;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;br /&gt;iv) DATE FUNCTIONS:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Built in single row functions of SQL that work on Date type of data are called as Date functions. Date functions in SQL are as follows.&lt;br /&gt;&lt;br /&gt;SYSDATE : Returns current system date.&lt;br /&gt;Example : Select Sysdate From Dual;&lt;br /&gt;&lt;br /&gt;ADD_MONTHS(Date, n) : Returns a date after adding ‘n’ number of months to the given date.  If ‘n’ value is negative then ‘n’ months are subtracted from the given date.&lt;br /&gt;Following example adds two months to the current system date and returns a date. If the current system date is 13-JAN-2003 then this example will return 13-MAR-2003.&lt;br /&gt;&lt;br /&gt;Example : Select Add_Months( Sysdate, 2 ) from Dual;  &lt;br /&gt;&lt;br /&gt;MONTHS_BETWEEN( Date1, Date2 ) : Return the difference between given two dates in number of months.&lt;br /&gt;Following example returns the difference between sysdate and ‘01-MAR-2003’. If the system date is ‘13-JAN-2003’, then result will be 1.51(Estimated). Actually the difference is 1 month 16 days. Value after decimal point is obtained by using  “(16/30)*100” Calculation.&lt;br /&gt;&lt;br /&gt;Example : Select MONTHS_BETWEEN(Sysdate, TO_DATE(‘01-MAR-03’)) from Dual;&lt;br /&gt;&lt;br /&gt;NEXT_DAY(Date, day) : Returns the date of given day after given date.&lt;br /&gt;Following Example returns the date of ‘Sunday’ after sysdate. If system date is ‘13-JAN-2003’ then result will be ‘19-JAN-2003’.&lt;br /&gt;&lt;br /&gt;Example : Select NEXT_DAY(Sysdate, ‘Sunday’) from Dual; &lt;br /&gt;&lt;br /&gt;LAST_DAY(Date) : Returns the date of last day of the month in given date.&lt;br /&gt;Following example returns the last day of the month in system date. If system date is ‘13-JAN-2003’, then result will be ‘31-JAN-2003’ i.e. the last day of month in sysdate i.e. January.&lt;br /&gt;&lt;br /&gt;Example : Select Last_Day(Sysdate) from Dual;  &lt;br /&gt;           &lt;br /&gt;ROUND(Date, format ) : Rounds the given date to given format.&lt;br /&gt;Following example Rounds the system date to 1 month. When we are rounding to a month, then Depending on the day of month i.e. if day is less than or equal to 15, then first day of current month will be the result. If day is greater than 15, then first day of next month will be returned. If sysdate is ‘13-JAN-2003’, then result will be ‘01-JAN-2003’. Because day is ‘01’. If sysdate is ‘17-JAN-2003’, then result will be ‘01-FEB-2003’. Because day is ‘17’.&lt;br /&gt;&lt;br /&gt;Example 1 : Select ROUND(Sysdate, ‘MM’) from Dual;  &lt;br /&gt;     &lt;br /&gt;Following example Rounds the system date to 1 Year. When we are rounding to a year, then Depending on month of the year i.e. if month is less than or equal to 6, then first day of current year will be the result. If month is greater than 6, then first day of next year will be returned. If sysdate is ‘13-MAR-2003’, then result will be ‘01-JAN-2003’. Because month is ‘03’. If sysdate is ‘13-JUL-2003’, then result will be ‘01-JAN-2004’. Because month is ‘7’.&lt;br /&gt;&lt;br /&gt;Example 2: Select ROUND(Sysdate, ‘YY’) from Dual;    &lt;br /&gt;&lt;br /&gt;Following example Rounds the system date to 1 Day. When we are rounding to a Day, then Depending on the time of Day i.e. if Time is less than or equal to 12PM, then time part is rounded to “00:00:00AM” of the same date. If Time is greater than 12PM, then, time part is rounded to “00:00:00AM” of the next day of current date. If sysdate is ‘13-JAN-2003 10:23:22AM’, then result will be ‘13-JAN-2003 00:00:00AM’. Because Time is ’10:23:22AM’. If sysdate is ‘13-JAN-2003 01:24:12PM’, then result will be ‘14-JAN-2003 00:00:00AM’. Because Time is ’01:24:12PM’.&lt;br /&gt;&lt;br /&gt;Example 3 : Select To_char(ROUND(Sysdate, ‘DD’),’dd-mon-yy hh12:mi:ssAM’) from Dual;            &lt;br /&gt;&lt;br /&gt;TRUNC(Date, Format) : Truncates the given date to given format.&lt;br /&gt;Following example truncates the system date to 1 month. Unlike Round function, truncate returns the first day of month in given date even date is either less than or equal to 15 or greater than 15. If system date is ‘13-JAN-2003’, then result will be ‘01-JAN-2003’.&lt;br /&gt;&lt;br /&gt;Example 1: Select TRUNC(Sysdate, ‘MM’) from Dual;&lt;br /&gt;&lt;br /&gt;Following example truncates the system date to 1 Year. Unlike Round function, truncate returns the first day of year in given date even month is either less than or equal to 6 or greater than 6. If system date is ‘13-JUL-2003’, then result will be ‘01-JAN-2003’.&lt;br /&gt;&lt;br /&gt;Example 2: Select TRUNC(Sysdate, ‘YY’) from Dual;&lt;br /&gt;&lt;br /&gt;Following example truncates the system date to 1 Day. Unlike Round function, truncate truncates the time part to “00:00:00AM” of the given date even the time is either less than or equl to 12PM or greater than 12PM. If the sysdate is ‘13-JAN-2003 01:24:12” then result will be ‘13-JAN-2003 00:00:00AM’.&lt;br /&gt;&lt;br /&gt;Example 3: Select TRUNC(Sysdate, ‘DD’) from Dual;&lt;br /&gt;&lt;br /&gt;DATE ARITHMETIC&lt;br /&gt;&lt;br /&gt;Date + n :  Returns a date after adding ‘n’ no. of days to the given date.&lt;br /&gt;Following example adds 3 days to system date. If system date is ‘14-JAN-2003’, then result wil be ‘17-JAN-2003’.&lt;br /&gt;&lt;br /&gt;Example : Select Sysdate+3 from dual;&lt;br /&gt;&lt;br /&gt;Date – n : Returns a date after subtracting ‘n’ no. of Days from given date.&lt;br /&gt;Following example subtracts 3 days from system date. If system date is ‘14-JAN-2003’, then result wil be ‘11-JAN-2003’.&lt;br /&gt;&lt;br /&gt;Example : Select Sysdate - 3 from dual;&lt;br /&gt;&lt;br /&gt;3. DATE1 –DATE2 : Returns the difference between given two dates in no. of days.&lt;br /&gt;Following example calculates the difference between system date and ‘20-JAN-2003’. If system date is ‘14-JAN-2003’, then result will be 6. Result may come in float value i.e. 5.45, when the difference is not exactly the multiple of 24 hours. This function calculates the difference from “00:00:00AM” of ‘14-JAN-2003’ to “00:00:00AM” of ‘21-JAN-2003’(we have given the date as ‘20-JAN-2003’ and this day will be completed at “00:00:00AM” of ‘21-JAN-2003’). When the difference is not exactly the multiple of 24, then this function calculates the decimal value as current hour/24*100.&lt;br /&gt;&lt;br /&gt;Example : Select sysdate – to_date(‘20-JAN-2003’) from Dual;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;SPECIAL FUNCTIONS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;DECODE :  Built in single row functions of SQL those works on any type of data are called as Special functions. Special functions in SQL are as follows.&lt;br /&gt;&lt;br /&gt;Syntax : DECODE(Expression, Result1, ReturnVal1, Result2, ReturnVal2,… else ReturnVal);&lt;br /&gt;This function is equivalent to if statement in programming languages. If the expression returns a value equivalent to Result1, then function returns ReturnVal1, if the expression returns a value equivalent to Result2, then function returns ReturnVal2 and so on.&lt;br /&gt;Following example displays Employee name and Salary. Value of salary column is displayed as ‘On Target’ if employee’s salary is 1500, ‘Below 1500’ if salary is less than 1500 and actual salary i.e. 2000,3000 and so on if salary is greater than 1500.&lt;br /&gt;&lt;br /&gt;            Sign function returns –1 if the value passed is negative, 1 if the value assed is positive, and 0 if the value passed is zero. If the result of the expression Sign(sal-1500) is –1, then Decode Function will return ‘Below 1500’. If the result is zero, then decode function will return ‘on target’. If the expression sign(sal-1500) does not return either –1 or zero, the decode function will return the salary of employee.&lt;br /&gt;&lt;br /&gt;Example : Select Ename, DECODE(Sign(Sal-1500), -1, ‘Below 1500’, 0, ‘On Target’, Sal) Salary from EMP;&lt;br /&gt;&lt;br /&gt;Using Case : As of Oracle 9i, you can use CASE function in place of DECODE. The CASE function uses the keywords when, then, else, and end to indicate the logic path followed, which may take the resulting code easier to follow than an equivalent DECODE.&lt;br /&gt;&lt;br /&gt;Following example displays Employee name and Salary. Value of salary column is displayed as ‘On Target’ if employee’s salary is 1500, ‘Below 1500’ if salary is less than 1500 and actual salary i.e. 2000,3000 and so on if salary is greater than 1500.&lt;br /&gt;&lt;br /&gt;Example : Select Ename, case sign(sal-1500)&lt;br /&gt;                                                when 0 then 'On Target'&lt;br /&gt;                                                when -1 then 'Below target'&lt;br /&gt;                                                else to_char(sal)&lt;br /&gt;                                                end "salary" from emp&lt;br /&gt;&lt;br /&gt;NVL(Col, Val ) : Replaces Null value in the given column with given val.&lt;br /&gt;Following example displays Employee name, Salary and Total Remuneration for all employees. Total Remuneration is calculated by the formula ( (Sal * 12 ) + Comm ). Any arithmetic operation with null value result null value. As only Sales employees are having commission, For all remaining employees the total remuneration will be Null. To solve this problem we will write the formula to calculate total remuneration as ((Sal * 12) + nvl(Comm,0)). This replaces the null value of comm column with zero. Now arithmetic operation is not performed against null value. Hence the result will be correct.&lt;br /&gt;&lt;br /&gt;Example : Select Ename, Sal, (Sal*12+NVL(Comm, 0)) TotalRem from EMP;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;br /&gt;LIST FUNCTIONS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The built in functions of SQL that work on a given list of values are called as List Funtions. The list functions in SQL are as follows.&lt;br /&gt;&lt;br /&gt;1. LEAST(Val1, Val2, …, Valn) : Returns the smallest value in given list of values.&lt;br /&gt;&lt;br /&gt;Example 1 : Select Least(10, 15, 120, 380, 0 ) from Dual;     ( Result is 0 )&lt;br /&gt;Example 2 : Select Least( ‘ORACLE’, ‘MICROSOFT’, ‘SUN’, ‘ADOBE’ ) from Dual; (Result is ADOBE)&lt;br /&gt;&lt;br /&gt;Example 3 : Select Least(To_Date(‘01-JAN-03’), To_Date(‘12-DEC-02’),To_char(‘31-DEC-03’)) from Dual; (Result is ‘12-DEC-02’)&lt;br /&gt;&lt;br /&gt;2.GREATEST( Val1, Val2,…,Valn) : Returns the largest value in given list of values.&lt;br /&gt;&lt;br /&gt;Example 1 : Select Greatest(10, 15, 120, 380, 0 ) from Dual;     ( Result is 380 )&lt;br /&gt;&lt;br /&gt;Example 2 : Select Greatest( ‘ORACLE’, ‘MICROSOFT’, ‘SUN’, ‘ADOBE’ ) from Dual; (Result is SUN)&lt;br /&gt;&lt;br /&gt;Example 3 : Select Greatest(To_Date(‘01-JAN-03’), To_Date(‘12-DEC-02’),To_char(‘31-DEC-03’)) from Dual; (Result is ‘31-DEC-03’)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;GROUP FUNCTIONS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Built in functions of SQL those works on a group of values are called as Group functions. Group functions in SQL are as follows.&lt;br /&gt;&lt;br /&gt;1. SUM(Col) : Returns the sum of all values in the given column.&lt;br /&gt;Following example finds the total salary drawn by all employees.&lt;br /&gt;&lt;br /&gt;Example : Select SUM(Sal) from EMP;&lt;br /&gt;&lt;br /&gt;AVG(Col) : Returns average of all values in the given column.&lt;br /&gt;Following example finds the average salary drawn by all employees.&lt;br /&gt;&lt;br /&gt;Example : Select AVG(Sal) from EMP;&lt;br /&gt;&lt;br /&gt;3. MAX(Col) : Returns maximum value of the values in the given column.&lt;br /&gt;Following example finds the maximum salary among the salaries of all employees.&lt;br /&gt;&lt;br /&gt;Example : Select MAX(Sal) from EMP;&lt;br /&gt;&lt;br /&gt;MIN(Col) : Returns the minimum value of the values in the given column.&lt;br /&gt;Following example finds the minimum salary among the salaries of all employees.&lt;br /&gt;&lt;br /&gt;Example : Select MIN(Sal) from EMP;&lt;br /&gt;&lt;br /&gt;5. COUNT(Col) : Returns the count of Non Null values in the given column.&lt;br /&gt;Following eample finds the number of employees drawing Commission.&lt;br /&gt;&lt;br /&gt;Example : Select COUNT(COMM) from EMP;&lt;br /&gt;&lt;br /&gt;6. COUNT(*) : Returns the total number of rows in the given table.&lt;br /&gt;Following eample finds the total number of employees in Emp Table.&lt;br /&gt;&lt;br /&gt;Example : Select COUNT(*) from EMP;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. STDDEV(Col) : Returns the standard deviation for all values of the given column.&lt;br /&gt;Following eample calculates the Standard deviation of salaries of all employees.&lt;br /&gt;&lt;br /&gt;Example : Select STDDEV(SAL) from EMP;&lt;br /&gt;&lt;br /&gt;VARIANCE(Col) : Returns the variance for all values of the given column.&lt;br /&gt;Following eample calculates the Variance of salaries of all employees.&lt;br /&gt;&lt;br /&gt;Example : Select VARIANCE(SAL) from EMP;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;GROUP BY :&lt;/span&gt;&lt;/strong&gt; Group by clause is used to divide the rows of a table into groups and apply group functions on each group separately.&lt;br /&gt;Following example finds the maximum salary in each deartment.&lt;br /&gt;&lt;br /&gt;Example 1 : Select Deptno, Max(Sal) from EMP Group By Deptno;&lt;br /&gt;&lt;br /&gt;Following example finds the average Salary for each job type.&lt;br /&gt;&lt;br /&gt;Example 2 : Select Job, AVG(Sal) from EMP Group By Job;&lt;br /&gt;&lt;br /&gt;Rule : When we are using group by clause in a select statement, then all column names in the selection list except group functions must be included in group by clause.&lt;br /&gt;            Following example finds the total salary drawn by each job type in each department. In this example Deptno and job, two columns are listed in selection list along with the group function sum. As per the rule, we must include these two columns in, group by clause.&lt;br /&gt;&lt;br /&gt;Example 3 : Select Deptno, Job, Sum(Sal) from emp group by Deptno, Job;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;strong&gt;&lt;br /&gt;HAVING :&lt;/strong&gt;&lt;/span&gt; When we have to check a condition that includes a group function, then instead of where clause we must use Having clause.&lt;br /&gt;Following example finds sum of salaries of all employees of the departments that have more than 3 employees.&lt;br /&gt;&lt;br /&gt;Example 1: Select Deptno, Sum(sal) from EMP Group By Deptno Having COUNT(*) &gt; 3;&lt;br /&gt;&lt;br /&gt;            Following example finds the number of employees in departments whose average salary is more than 3000.&lt;br /&gt;&lt;br /&gt;Example 2: Select Deptno, Count (*) from EMP Group By Deptno Having AVG(Sal) &gt; 3000;&lt;br /&gt;&lt;br /&gt;Rule : If  we are using having clause in a select statement, then a corresponding Group By clause is MUST in that select statement.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-7605303439387043131?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/7605303439387043131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=7605303439387043131' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/7605303439387043131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/7605303439387043131'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/built-in-functions-in-oracle.html' title='BUILT IN FUNCTIONS IN ORACLE'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-4282598231400224164</id><published>2008-07-28T21:31:00.000-07:00</published><updated>2008-07-28T21:35:07.638-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>SET OPERATORS</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;S E T   O P E R A T O R S&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; Here the data retrieved by a select statement is treated as a set. Set operators are used to combine Two sets retrieved by two different select statements. The two select statements may retrieve data from the same table or from different tables. Set operators in SQL are as follows.&lt;br /&gt;&lt;br /&gt;UNION     &lt;br /&gt;UNION ALL&lt;br /&gt;INTERSECT                   &lt;br /&gt;MINUS&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;1. UNION :&lt;/span&gt; The set operator Union combines the data retrieved by two different select statements by eliminating duplicate values that are obtained after combining the data of two select statements.&lt;br /&gt;Following Example finds all jobs that are in departments 10, 20. In this example, first select statement retrieves the list of jobs in department 10. For example, the jobs in department 10 are Manager, Clerk, and Accountant. Second select statement retrieves the list of jobs in department 20. For example, jobs in department 20 are Manager, Clerk, and Analyst. Result of combining these two results is Manager, Clerk, Accountant, Manager, Clerk, and Analyst. Here Manager and Clerk are duplicated. Union eliminates the duplicated values and final result of union is Manager, Clerk, Accountant, and Analyst.&lt;br /&gt;&lt;br /&gt;Example : Select JOB from EMP where Deptno =10                                       &lt;br /&gt;            UNION&lt;br /&gt;            Select JOB from EMP where Deptno = 20;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;2. UNION ALL :&lt;/span&gt; Like UNION, UNION ALL also combines two sets that are retrieved by two different select statements except that it does not  eliminate duplicate values.&lt;br /&gt;            If we take the same above example with union all, then the final result is Manager, Clerk, Accountant, Manager, Clerk, and Analyst.&lt;br /&gt;&lt;br /&gt;Example : Select JOB from EMP where Deptno =10                                       &lt;br /&gt;            UNION ALL&lt;br /&gt;                  Select JOB from EMP where Deptno = 20;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;br /&gt;3. INTERSECT :&lt;/span&gt; The set operator INTERSECT results the values that are common in two sets that are retrieved by two different select statements.&lt;br /&gt;Following example finds the jobs that are present in both departments 10 and 20. In this example, first select statement retrieves the list of jobs in department 10. For example, the jobs in department 10 are Manager, Clerk, and Accountant. Second select statement retrieves the list of jobs in department 20. For example, jobs in department 20 are Manager, Clerk, and Analyst. Result of combining these two results is Manager, Clerk, Accountant, Manager, Clerk, and Analyst. Here Manager and Clerk are Common in both sets. Hence the final result is Manager and Clerk.&lt;br /&gt;&lt;br /&gt;Example : Select JOB from EMP where Deptno=10&lt;br /&gt;            INTESRSECT&lt;br /&gt;            Select JOB from EMP where Deptno = 20;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;4. MINUS :&lt;/span&gt; The  set operator MINUS retrieves the values that are present in first set retrieved by first select statement and not in second set retrieved by second select statement.&lt;br /&gt;Following example finds the jobs that are in department 10, but not in department 20. In this example, first select statement retrieves the list of jobs in department 10. For example, the jobs in department 10 are Manager, Clerk, and Accountant. Second select statement retrieves the list of jobs in department 20. For example, jobs in department 20 are Manager, Clerk, and Analyst. Here Accountant job is present in department 10 but not in department 20. Hence the final result is Accountant.&lt;br /&gt;&lt;br /&gt;Example : Select JOB from EMP where Deptno=10  MINUS&lt;br /&gt;            Select JOB from EMP where Deptno = 20;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;RULES FOR WORKING WITH SET OPERATORS&lt;/span&gt; :&lt;br /&gt;&lt;br /&gt;Both Select statements must contain same number of columns in the selection list.&lt;br /&gt;Corresponding columns in both the select statements must be of same type.&lt;br /&gt;When using order by clause with set operators, order by clause must be written at            the end of second select statement only.&lt;br /&gt;In order by clause we have to specify the position of the column in selection list     instead of column name.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-4282598231400224164?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/4282598231400224164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=4282598231400224164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4282598231400224164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4282598231400224164'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/set-operators.html' title='SET OPERATORS'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-36209512783875913</id><published>2008-07-28T21:28:00.000-07:00</published><updated>2008-07-28T21:31:01.573-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>JOINS IN ORACLE</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;J O I N I N G&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Combining data from more than one table using a single select statement is called JOINING. Joining in SQL is of these types.&lt;br /&gt;&lt;br /&gt;Equi Join&lt;br /&gt;Natural Join&lt;br /&gt;Outer Join&lt;br /&gt;Inner Join&lt;br /&gt; Self Join&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;1.EQUI JOIN :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Joining more than one table by using a condition that includes ‘ = ’ operator is called as EQUI JOIN.&lt;br /&gt;Following example displays employee details along with Department name in which he is working. Employee details are present in EMP table and Department name exists in another table DEPT. Hence in this example joining is performed between EMP and DEPT. When performing join operation, then we must specify column names in selection list as tablename.columnname when any two tables among all tables we are going to join have a column with same name. Instead of using entire table name, we can use alias names for the tables as in the following example. Using alias names is otional for the columns that are not common in two tables.&lt;br /&gt;&lt;br /&gt;Example : Select Ename, Job, Sal, E.Deptno, Dname from EMP E, DEPT D where E.Deptno=D.Deptno;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;2. NATURAL JOIN &lt;/span&gt;&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt; As of Oracle 9i, you can use the natural join keyword to indicate that a join should be performed based on all columns that have the same name in the two tables being joined.&lt;br /&gt;&lt;br /&gt;Example : Select Ename, Job, Sal, Deptno, Dname from EMP natural join DEPT;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;3. OUTER JOIN :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; Outer Join is used to display the rows that doesn’t satisfy the given condition, along with the rows that satisfy the given condition. To perform outer join, “right outer join” or “left outer join” or “full outer join” clauses are used. These clauses are used in from clause of the select statement.&lt;br /&gt;The above example, written for the equi-join does not display the department names, in which there are no employees. Because the given condition E.Deptno=D.Deptno will be false for the departments that have no employees. Following example displays the employee details along with their department names. Also displays the department names that have no employees. For this outer-join is performed between emp and dept and “right outer join” clause is used. Because a department exists but corresponding employee does not exist. This means that EMP table does not contain rows corresponding to one or more departments in dept table and DEPT table is towards right side of the equi-join condition.&lt;br /&gt;&lt;br /&gt;Example : Select Ename, Job, Sal, D.Deptno, Dname from EMP E right outer join DEPT D on E.Deptno = D.Deptno;&lt;br /&gt;     &lt;br /&gt;You can replace the on clause with a using clause along with the name of the column the tables have in common – do not qualify the column name with a table name or table alias.&lt;br /&gt;&lt;br /&gt;Example : Select Ename, Job, Sal, Deptno, Dname from EMP right outer join DEPT  using(deptno)&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;4. INNER JOIN :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Support for inner join was introduced in Oracle9i. inner joins are the default – they return the rows the two tables have in common, and are the alternative to outer joins. Note that they support on and using clauses. So you can specify your join criteria.&lt;br /&gt;Following example displays employee details along with their grade. Employee details are present in EMP Table and Grade Details are present in SALGRADE Table.  SALGRADE table contains LOSAL, HISAL and GRADE Columns. LOSAL and HISAL are the salary range and GRADE is grade of the employees having the salary in that salary range. In this example between…and operator is used. Here as both tables EMPand SALGRADE does not contain columns with same names, Table aliases are not used.&lt;br /&gt;&lt;br /&gt;Example : Select Ename, Job, Sal, Deptno, Grade from EMP inner join SALGRADE on Sal BETWEEN Losal AND Hisal;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;5.  SELF JOIN :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; Joining a table to it self is called as Self-Join. Generally self-join is performed on a table that contains self-referential key. Self-referential key is a foreign key that refers to a primary key present in the same table in which it presents.&lt;br /&gt;Following example displays Employee details along with their manager name. In EMP table, EMPNO is primary key and MGR is a foreign key that refers to the primary key EMPNO. As manager is also an employee in the same table, we can get manager’s name by joining EMP table to it self. In self-join we must use alias names or tablename.columnname notation.&lt;br /&gt;&lt;br /&gt;Example : Select E.Empno, E.Ename, E.Job, E.Sal, E.Mgr, M.Ename “MANAGER” from EMP E inner join EMP M on E.Mgr = M.Empno;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;RULES TO PERFORM JOIN :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;User must follow the following rules when performing join operation.&lt;br /&gt;&lt;br /&gt;1. In joining statements you must specify the column names in the selection list even you are&lt;br /&gt;Selecting all columns of the table and specifying “*” to select al columns is not possible.&lt;br /&gt;2. If the joining tables contain columns with same name, then tablename.columnname notation or table alias is must except when performing natural join and when using “using” clause.&lt;br /&gt;3. The number of join conditions must be one less than the number of tables you are going to join when performing inner join.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-36209512783875913?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/36209512783875913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=36209512783875913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/36209512783875913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/36209512783875913'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/joins-in-oracle.html' title='JOINS IN ORACLE'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-2584145352837690844</id><published>2008-07-28T21:25:00.000-07:00</published><updated>2008-07-28T21:28:05.232-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>SUB QUERIES</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;S U B Q U E R I E S&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;A statement requesting data from database called as a query. As we are using select statement to request data from database, select statement is called as a query. Writing a select statement within another select statement is called as a Subquery. In a subquery the select statement that contains another select statement within it is called as outer query and the select statement that is within another select statement is called as Inner query. Inner query must be placed in parantheses. This is because inner query must be executed prior to outer query. Sub queries in SQL are of four types and are as follows.&lt;br /&gt;&lt;br /&gt;Single Row Sub Queries&lt;br /&gt;Multi Row Sub Queries&lt;br /&gt;Nested Sub Queries&lt;br /&gt;Correlated Sub Queries&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;1.SINGLE ROW SUBQUERIES :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If an inner query of a subquery returns only one value then that subquery is called as a Single Row Subquery.&lt;br /&gt;Following example displays the employee details whose salary is maximum salary among all employees. In this example, inner query retrieves the maximum salary in EMP table and outer query compares salary of every employee with the salary returned by inner query. When employee salary is equal to the salary returned by inner query, then that employee row is displayed in output.&lt;br /&gt;&lt;br /&gt;Example 1 : Select * from EMP where Sal = ( Select Max(Sal) from EMP );&lt;br /&gt;&lt;br /&gt;Following example displays all employee details who are working in SALES deparetment. Because EMP table contains only department number and it does not contain department name, first we have to know the DEPTNO of SALES department. Inner query retrieves the DEPTNO of sales department from DEPT table and that DEPTNO is used by outer query to find employees working in SALES department.&lt;br /&gt;&lt;br /&gt;Example 2 : Select * from EMP where Deptno=(Select Deptno from DEPT where Dname=’SALES’);&lt;br /&gt;           &lt;br /&gt;As inner query of above two subqueries returns only one value, these subqueries are called as single row subqueries.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;2.MULTI ROW SUB QUERIES :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If an inner query of a subquery returns more than one value then that subquery is called as a Multi Row Subquery.&lt;br /&gt;Following example finds the employees drawing maximum salary for each department. In this example, inner query returns the list of maximum salaries in all departments and outer query will compare employee salary with the list of salaries returned by inner query. If employee salary is equivalent to any one of the slary in the list of slaries returned by inner query, then that employee row is displayed in out put.&lt;br /&gt;&lt;br /&gt;Example : Select * from EMP where Sal in ( Select Max(Sal) from EMP Group By Deptno );&lt;br /&gt;           &lt;br /&gt;            But the result of this query is wrong. If maximum salaries of departments 10,20, and 30 are 1500,2800,5000 and an employee of department 30 has a monthly salary 2800, then the row of that employee is also retrieved even he is not drawing maximum salary in his department i.e. 5000. When working with multi-row subqueries, we must perform condition checking with more than one column and the above query corrected is as follows.&lt;br /&gt;Example : Select * from EMP where (Deptno, Sal) in ( Select Deptno, Max(Sal) from EMP Group By Deptno);&lt;br /&gt;&lt;br /&gt;            In the above subquery, inner query returns more than one value. Hence this subquery is called as multi-row subquery. There are two special operators that can be used with Multi Row subqueries. They are Any/Some and All.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;ANY / SOME :&lt;/span&gt;&lt;/strong&gt; This operator can be used only with  multi row  subqueries. This operator returns true if the given condition is true with any one of the values retrieved by the inner query.&lt;br /&gt;Following example finds all employees who are drawing more salary than any one of the employees working in Department 30. Inner query retrieves a list of slaries drawn by the employees working in department 30 and outer query will compare the salary of each employee with every value returned by inner query. If the given condition is true with any one of the values in the list of salaries returned by inner query, then that row is displayed in the output. If the given condition is not true with all values in the list returned by inner query, then that row is not displayed in the output.&lt;br /&gt;Example : Select * from EMP where Sal &gt; ANY(Select distinct Sal from EMP where Deptno=30);&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;ALL :&lt;/span&gt;&lt;/strong&gt; This operator can also be used only with multi row subqueries. This operator returns true if the given condition is true with all values returned by inner queery.&lt;br /&gt;            Following example finds all employees whose salary is more than every employee working in Department 30. Inner query retrieves a list of slaries drawn by the employees working in department 30 and outer query will compare the salary of each employee with every value returned by inner query. If the given condition is true with all of the values in the list of salaries returned by inner query, then that row is displayed in the output. If the given condition is not true with any one of the value in the list returned by inner query, then that row is not displayed in the output.&lt;br /&gt;&lt;br /&gt;Example : Select * from EMP where Sal &gt; ALL(Select distinct sal from EMP where Deptno = 30 );&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;strong&gt;3. NESTED SUBQUERIES :&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; If an inner select statement of a subquery contains another select statement within it then that subquery is called as Nested subquery. Subqueries can be nested up to 255 levels.&lt;br /&gt;Following example finds all employees whose salary is more than average salary of sales department. As department name does not existin EMP table, first we have to find the deptno of sales dapartment. Then we have to find the average salary of sales department by using deptno returned by inner most query. Finally this average salary is used by outer query to find the employees whose salary is more than this average salary.&lt;br /&gt;&lt;br /&gt;Example : Select * from EMP where Sal &gt; (Select AVG(Sal) from EMP where Deptno = (Select Deptno from DEPT where Dname = ‘SALES’ ));&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;4. CO-RELATED SUBQUERIES :&lt;/span&gt;&lt;/strong&gt; If an inner query of a subquery contains an outer query column in the condition of where clause then that subquery is called as a co-related subquery.&lt;br /&gt;Following example finds all employees whose Salary is more than average salary of the department in which they are working. Inner query finds the average salary of a department in which an employee, whose row is curently accessed by outer query and this average salary is compared to the salary of that employee and if his salary is more than average salary. Then his row is displayed in the output.&lt;br /&gt;&lt;br /&gt;Example : Select * from EMP E where Sal &gt; ( Select AVG(Sal) from EMP S Where E.Deptno = S.Deptno );&lt;br /&gt;&lt;br /&gt;The difference between normal subqueries and correlated subqueries is that in normal subqueries the inner query is executed only once. But in correlated subqueries inner query is executed once per each row of the outer query.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-2584145352837690844?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/2584145352837690844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=2584145352837690844' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/2584145352837690844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/2584145352837690844'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/sub-queries.html' title='SUB QUERIES'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-5134911625007606526</id><published>2008-07-28T21:19:00.001-07:00</published><updated>2008-07-28T21:24:17.135-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>TRANSACTION PROCESIING, CONCURRENCY AND LOCKING</title><content type='html'>&lt;span style="font-size:180%;"&gt;&lt;strong&gt;TRANSACTION PROCESSING&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;            A transaction is an operation against the database, which comprises a series of changes to one or more tables. There are two classes of transactions, DML transactions, Which can consist of any number of DML statements and which Oracle treats as a Single entity or Logical unit of work and DDL transactions, which can only consist of one DDL statement.&lt;br /&gt;&lt;br /&gt;            There can be no halfway situation during the execution of the transaction, where some changes specified within the transaction are made to the database and others are not made. For every transaction either all the changes made to the database are made permanent or none of the changes are carried out.&lt;br /&gt;&lt;br /&gt;            &lt;strong&gt;A transaction begins when the first executable DML or DDL command is encountered and ends when one of the following occurs.&lt;br /&gt;&lt;/strong&gt;1. Commit or Rollback&lt;br /&gt;2. DDL Command is issued&lt;br /&gt;3. Certain Errors        &lt;br /&gt;4. Log Off&lt;br /&gt;5. Machine Failure.&lt;br /&gt;A DDL statement is automatically committed and therefore implicitly ends a transaction. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Making Changes Permanent&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;            In order for changes to become permanent they must be committed to the database. The “ COMMIT ” command makes database changes permanent. The change or changes made to the database between two COMMIT commands therefore makeup a transaction. Until a transaction is committed, none of its changes are visible to other users.&lt;br /&gt;&lt;br /&gt;COMMIT &lt;br /&gt;Commit makes changes in the current transaction permanent.&lt;br /&gt;Commit erases all Save Points in the transaction.&lt;br /&gt;Commit ends the transaction.&lt;br /&gt;Commit releases the transaction locks.&lt;br /&gt;You should explicitly end the transaction in application programs, using COMMIT statement. If you do not explicitly COMMIT the transaction and the program terminates abnormally, the last committed transaction will be rolled back.&lt;br /&gt;Implicit commits occur in the following situations.&lt;br /&gt;Before a DDL command.&lt;br /&gt;After a DDL statement.&lt;br /&gt;At normal disconnect from database.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Removing Unwanted Changes :&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;            Uncommitted changes may be abandoned by typing “ROLLBACK“. Rollback will return the data to the state it was in immediately after your last Commit by discarding all changes made since the last commit.&lt;br /&gt;&lt;br /&gt;Syntax: RollBack to Savepoint Savepointname;&lt;br /&gt;&lt;br /&gt;The Rollback statement is used to UNDO work.&lt;br /&gt;Rollback to a savepoint is optional.&lt;br /&gt;If you use rollback without a “ to Savepoint ” clause, it&lt;br /&gt;Ends the transaction.&lt;br /&gt;Undoes all changes in current transaction.&lt;br /&gt;Erases all Savepoints in that transaction.&lt;br /&gt;Releases the transaction locks.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Save Point :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Syntax :          Savepoint SavepointName;&lt;br /&gt;&lt;br /&gt;Savepoint can be used to divide a transaction into smaller portions.&lt;br /&gt;Savepoints allow you to arbitrarily hold your work at any point in time, with the option of later committing that work or undoing all or a portion of it.&lt;br /&gt;If you create a second savepoint with the same name as an earlier Savepoint, the earlier Savepoint is deleted.&lt;br /&gt;The maximum number of Savepoints per user process is defaults to 5.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;System Failures :&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;            When a transaction is interrupted by a serious error, for example, a system failure, the entire transaction is automatically rolled back. This prevents the error from causing unwanted changes to your data and returns your tables to their status at the time of the last COMMIT.&lt;br /&gt;            An automatic roll back is most often caused by a system failure, such as an unintentional system reset or power blackout. Errors in entering commands such as misspelling a column name or trying to perform an unauthorized operation on another user’s table do not interrupt a transaction or cause an automatic rollback.&lt;br /&gt;Auto Commit :&lt;br /&gt;          Commit or Rollback may be issued manually or automatically by using the auto commit option of the set command.  Syntax: Set AutoCommit On/Off.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:180%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;strong&gt;CONCURRENCY AND LOCKING&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oracle locks are used to control concurrent access to data. Locks are mechanisms intended to prevent destructive interaction between users accessing the same data. Locks are used to achieve two important goals, data concurrency and read consistency. Locks in Oracle fall into two categories.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Data Locks or DML Locks :&lt;/strong&gt;&lt;/span&gt; These locks protect data. Table locks lock the entire table while Row locks just locks selected rows.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Dictionary Locks :&lt;/span&gt;&lt;/strong&gt; These locks protect the structure of Database objects. Dictionary locks are of two types.&lt;br /&gt;Parse Locks   and&lt;br /&gt;DDL Locks.&lt;br /&gt;In this chapter we will discuss only data locks.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Summary Of Table Locks :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;            Tables can be locked in Exclusive(X), Share(S), RowExclusive(RX), RowShare(RS) and  ShareRowExclusive(SRX) modes. Following table shows the posiility of operations against a table when that table is locked in a particular mode. The user who locks the table can perform any operation against the table. The following table describes the posibilities for other users on a table, which is locked by a user. For example, if a table is locked in exclusive mode, then locking that table in any mode and performing DML operations is not posible for other users. In the same way if a table is locked in share mode, then locking that table in share mode and row share mode is possible for other users.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;&lt;br /&gt;Lock Table Command :&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Syntax : Lock Table Tabname1, Tabname2,…, Tabnamen In Lockmode [Nowait];&lt;br /&gt;&lt;br /&gt;            Here Tabname1, Tabname2, …. , Tabnamen are the names of tables to be locked. Lock mode is one of the modes in which a table can be locked i.e. exclusive, share, row exclusive, row share and share row exclusive. Nowait will allow the user to do other work when another user locks a table, which he accesses. If nowait is not specified, then the system will hang if another user locks the table, which he accesses, until that user releases the lock.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Implicit Locking :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; Implicit locking is the locking performed by Oracle automatically without Locking by the user manually. This implicit lock is generally done when updation or deletion is performed against a table and it locks only the rows that are affected by the update or delete statement.&lt;br /&gt;&lt;br /&gt;Select…For Update : The select for update statement will overwrite the default locking mechanism. It is used in anticipation of performing an update. The difference between select for update and Update is that select for update locks the rows earlier in a transaction.&lt;br /&gt;&lt;br /&gt;Syntax : Select col1, col2,…, coln from tablename For Update [ NOWAIT ]&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;Dead Lock :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; It is quite possible in a multi user environment, that two users will lock each other out of resources. It is also possible that two users will end up locking each other out of different resources. This situation is called a Dead Lock, Because each user is waiting for resources held by the other user.&lt;br /&gt;&lt;br /&gt;            When Oracle detects a dead lock, it signals an error to one of the participating transactions and rolls back the current statement of that transaction. This resolves the Dead Lock, although other users may still wait until their resource is available. The signaled user should explicitly rollback their transaction.&lt;br /&gt;&lt;br /&gt;            Dead locks can be avoided if users accessing the same tables lock those tables in the same order as each other. You should pre-define order of access for all tables in your applications and then have all applications follow the same order. If this order is followed in all applications, deadlocks will be kept to a minimum.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Duration Of Locks :&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;All locks acquired during a transaction are released when the transaction is committed or rolled back.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-5134911625007606526?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/5134911625007606526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=5134911625007606526' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5134911625007606526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5134911625007606526'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/transaction-procesiing-concurrency-and.html' title='TRANSACTION PROCESIING, CONCURRENCY AND LOCKING'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-5639426742374541923</id><published>2008-07-28T21:19:00.000-07:00</published><updated>2008-07-28T21:21:55.780-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>CONCURRENCY AND LOCKING</title><content type='html'>&lt;span style="font-size:180%;"&gt;&lt;strong&gt;CONCURRENCY AND LOCKING&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oracle locks are used to control concurrent access to data. Locks are mechanisms intended to prevent destructive interaction between users accessing the same data. Locks are used to achieve two important goals, data concurrency and read consistency. Locks in Oracle fall into two categories.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Data Locks or DML Locks :&lt;/strong&gt;&lt;/span&gt; These locks protect data. Table locks lock the entire table while Row locks just locks selected rows.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Dictionary Locks :&lt;/span&gt;&lt;/strong&gt; These locks protect the structure of Database objects. Dictionary locks are of two types.&lt;br /&gt;Parse Locks   and&lt;br /&gt;DDL Locks.&lt;br /&gt;In this chapter we will discuss only data locks.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Summary Of Table Locks :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;            Tables can be locked in Exclusive(X), Share(S), RowExclusive(RX), RowShare(RS) and  ShareRowExclusive(SRX) modes. Following table shows the posiility of operations against a table when that table is locked in a particular mode. The user who locks the table can perform any operation against the table. The following table describes the posibilities for other users on a table, which is locked by a user. For example, if a table is locked in exclusive mode, then locking that table in any mode and performing DML operations is not posible for other users. In the same way if a table is locked in share mode, then locking that table in share mode and row share mode is possible for other users.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;&lt;br /&gt;Lock Table Command :&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Syntax : Lock Table Tabname1, Tabname2,…, Tabnamen In Lockmode [Nowait];&lt;br /&gt;&lt;br /&gt;            Here Tabname1, Tabname2, …. , Tabnamen are the names of tables to be locked. Lock mode is one of the modes in which a table can be locked i.e. exclusive, share, row exclusive, row share and share row exclusive. Nowait will allow the user to do other work when another user locks a table, which he accesses. If nowait is not specified, then the system will hang if another user locks the table, which he accesses, until that user releases the lock.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Implicit Locking :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; Implicit locking is the locking performed by Oracle automatically without Locking by the user manually. This implicit lock is generally done when updation or deletion is performed against a table and it locks only the rows that are affected by the update or delete statement.&lt;br /&gt;&lt;br /&gt;Select…For Update : The select for update statement will overwrite the default locking mechanism. It is used in anticipation of performing an update. The difference between select for update and Update is that select for update locks the rows earlier in a transaction.&lt;br /&gt;&lt;br /&gt;Syntax : Select col1, col2,…, coln from tablename For Update [ NOWAIT ]&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;Dead Lock :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; It is quite possible in a multi user environment, that two users will lock each other out of resources. It is also possible that two users will end up locking each other out of different resources. This situation is called a Dead Lock, Because each user is waiting for resources held by the other user.&lt;br /&gt;&lt;br /&gt;            When Oracle detects a dead lock, it signals an error to one of the participating transactions and rolls back the current statement of that transaction. This resolves the Dead Lock, although other users may still wait until their resource is available. The signaled user should explicitly rollback their transaction.&lt;br /&gt;&lt;br /&gt;            Dead locks can be avoided if users accessing the same tables lock those tables in the same order as each other. You should pre-define order of access for all tables in your applications and then have all applications follow the same order. If this order is followed in all applications, deadlocks will be kept to a minimum.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Duration Of Locks :&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;All locks acquired during a transaction are released when the transaction is committed or rolled back.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-5639426742374541923?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/5639426742374541923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=5639426742374541923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5639426742374541923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/5639426742374541923'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/concurrency-and-locking.html' title='CONCURRENCY AND LOCKING'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-7611116392268174436</id><published>2008-07-28T21:12:00.000-07:00</published><updated>2008-07-28T21:18:29.813-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>USER, PRIVILLEGES and ROLES</title><content type='html'>&lt;span style="font-size:180%;"&gt;&lt;strong&gt;USER, ROLES &amp;amp; PRIVILEGES&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;    &lt;/span&gt;&lt;span style="font-size:100%;"&gt;        Oracle provides exclusive security features to safeguard your information from both unauthorized viewing and intentional or inadvertent damage. This security is provided by granting or revoking privileges on a person by person and privilege by privilege basis and is in addition to any security your computer system already has.&lt;br /&gt;           &lt;br /&gt;Every Oracle user has a name and password and owns any tables, views and other resources that he creates. An Oracle role is a set of privileges. You can grant or revoke specific privileges to roles and then assign roles to the appropriate user. A user can also grant privileges directly to other users.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;&lt;br /&gt;Users :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The Oracle system comes with two users already created System and Sys. You log on to the system user to create other users, since system user has that privilege. The create user command is used to create a new user. After creating a user we can change the password of the user or the memory allocation option or tablespace by using alter user command and it has the following syntax.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Syntax :&lt;/strong&gt; Alter user UNAME identified by PWD Quota unlimited/Nk on System;&lt;br /&gt;&lt;br /&gt;            Like create user command, alter user command must also be given only from SYSTEM user. There is another command to change the password of the user from within the same user to which the password has to be changed. That command is Password. To change the password by using this command, user must know the old password.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;Syntax :&lt;/strong&gt; Password&lt;br /&gt;&lt;br /&gt;            We can delete a user by using drop user command and has the following syntax.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;Syntax :&lt;/strong&gt; Drop user Uname [cascade];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Privileges :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To connect to the database or to create any objects within the database or to access the data owned by another user, a user must have a corresponding permission. These permissions are called PRIVILEGES.&lt;br /&gt;&lt;br /&gt;Database system privileges let you execute specific sets of commands. The “create table“ privilege, for example, lets you create tables. The “Grant Any Privilege” privilege allows you to grant any system privilege.&lt;br /&gt;&lt;br /&gt;Database object privileges give you the ability to perform some operation on various objects. The “Delete” privilege, for example, lets you delete rows from tables and views. The “Select” privilege allows you to Query with a Select from tables, views, sequences and snapshots.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Granting Privileges :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Grant command is used to grant any system privilege or role to another user, to another role, or to public. The grant command has the following syntax for granting system privileges or role. System privileges can be granted to any user from System User only.&lt;br /&gt;&lt;br /&gt;Syntax : Grant SystemPrivilege or Role, SystemPrivilege or Role, …&lt;br /&gt;To Username/Role, Username/Role, …&lt;br /&gt;[With Admin Option];&lt;br /&gt;&lt;br /&gt;Example : Grant Create User, Alter User, Drop User to Ramesh;&lt;br /&gt;&lt;br /&gt;After executing the above statement, user Ramesh can create a new user or alter an existing user or can delete an existing user from the database. The “with Admin Option” clause permits grantee to grant the Privilege/Role on to other user or role. If the above grant statement is written with “with admin option” at the end, then user Ramesh can grant “Create User”, “Alter User” and “Drop User” Privileges to other users, without connecting to system user.&lt;br /&gt;&lt;br /&gt;To grant object privileges the grant command has the following syntax.&lt;br /&gt;&lt;br /&gt;Syntax : Grant ObjectPrivilege, ObjectPrivilege,… on TableName&lt;br /&gt;To UserName/Role, Username/Role, …&lt;br /&gt;[ With grant Option ];&lt;br /&gt;&lt;br /&gt;For example, if you want to grant select, insert and update permissions on student table of your user to scott, then following statement is used.&lt;br /&gt;&lt;br /&gt;Example : Grant Select, Insert, Update(Fee) on Student to Scott;&lt;br /&gt;&lt;br /&gt;The above grant statement grants select, insert and updation of FEE column permissions on student table to user Scott. This means that Scott can perform selection, insertion on student table and he can update only fee column of student table.&lt;br /&gt;&lt;br /&gt;The “with Grant Option“ clause permits grantee to grant the Privilege on to other user or role. If the above grant statement is written with “with grant option” at the end, then user scott can grant “Select”, “Insert” and “Update” Privileges on student table to other users, without connecting to your user.&lt;br /&gt;&lt;br /&gt;Instead of granting specific privileges to specific users, we can grant all privileges on a table as follows.&lt;br /&gt;&lt;br /&gt;Example : Grant ALL on Student to Scott;&lt;br /&gt;&lt;br /&gt;Instead of granting specific privileges to specific users, we can grant specific privileges or all privileges on object or system privileges to all users in the database at a time by using keyword “PUBLIC“ in place of Username. Following grant statement grants all permissions on student table in your user to all users in the database.&lt;br /&gt;&lt;br /&gt;Example : Grant ALL on Student to Public;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Revoking Privileges :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Revoke is used to revoke privileges from a user or role. Revoke command has the following syntax for revoking System privileges. System privileges can be revoked from System user or the user who grants those permissions.&lt;br /&gt;&lt;br /&gt;Syntax : Revoke SystemPrivilege/Role, SystemPrivilege/Role,…&lt;br /&gt;From UserName/Role, UserName/Role…;&lt;br /&gt;&lt;br /&gt;Example : Revoke Create user, Alter user, Drop user from Ramesh;&lt;br /&gt;&lt;br /&gt;After executing the above revoke statement, user Ramesh can not create a new user or alter an existing user or drop an existing user.&lt;br /&gt;&lt;br /&gt;Revoke command has following syntax for revoking Object privileges.&lt;br /&gt;&lt;br /&gt;Syntax : Revoke ObjectPrivilege, ObjectPrivilege, …&lt;br /&gt;on TableName&lt;br /&gt;From Username/Role,Username/Role,…;&lt;br /&gt;&lt;br /&gt;Example 1 : Revoke Select, Insert, Update(Fee) on Student From Scott;&lt;br /&gt;Example 2 : Revoke All on Student From Public;&lt;br /&gt;&lt;br /&gt;Example 1 revokes select, insert and updation of fee column privileges on student table from user Scott. Example 2 revokes all permissions on student table from all users in the database.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Roles &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;A role is nothing but a set of privileges. Using following syntax creates a role.&lt;br /&gt;&lt;br /&gt;Syntax : Create Role RoleName;&lt;br /&gt;&lt;br /&gt;Example : Create Role TEST;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Granting Privileges On A Role :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Example 1 : Grant Select on Student to TEST;&lt;br /&gt;Example 2 : Grant Select, Insert, on Marks to TEST;&lt;br /&gt;Example 3 : Grant ALL on EMP to TEST;&lt;br /&gt;&lt;br /&gt;Above Grant statements grant different permissions on different users to the role TEST. You can also grant system privileges to the same role.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Granting A Role To A User&lt;/span&gt;&lt;/strong&gt; :&lt;br /&gt;&lt;br /&gt;Example : Grant TEST to Scott;&lt;br /&gt;&lt;br /&gt;Above grant statement grants all permissions of Role TEST to the user Scott.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Revoking A Role From A User :&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Example : Revoke TEST from Scott;&lt;br /&gt;&lt;br /&gt;Above grant statement revokes all permissions of Role Test from User Scott.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Revoking Privileges From A Role :&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Example : Revoke Select, Insert on Marks From TEST;&lt;br /&gt;&lt;br /&gt;This statement revokes select and insert privileges on Marks table from Role TEST.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Deleting A Role :&lt;/span&gt;&lt;/strong&gt; A Role can be deleted from database by using drop role command and has following syntax.&lt;br /&gt;&lt;br /&gt;Syntax : Drop Role RoleName;&lt;br /&gt;&lt;br /&gt;Example : Drop Role TEST;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Standard Roles&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Oracle provides standard roles for compatibility with previous versions.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;The Connect Role :&lt;/span&gt;&lt;/strong&gt; Occasional users, particularly those who do not create tables will usually be given only the connect role. Connect is the simple privilege to use Oracle at all. This right becomes meaningful with the addition of access to specific tables belonging to other users, and the privilege to select, insert, update and delete rows from these tables as each of these rights are granted.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;The Resource Role :&lt;/span&gt;&lt;/strong&gt; More sophisticated and regular users of the database may be granted the resource role. Resource role gives users the additional rights to create their own tables, sequences, procedures, triggers and clusters.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;The DBA Role :&lt;/span&gt;&lt;/strong&gt; The DBA role has all the system privileges including unlimited space quotas and the ability to grant all privileges to other users.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Synonym :&lt;/span&gt;&lt;/strong&gt; Synonym is nothing but an alias name to a table and is generally used when we have to access a table of another user. Prior to creating a synonym on another users table you must have privilege on that table.&lt;br /&gt;&lt;br /&gt;Syntax : Create [ Public ] Synonym Synonymname for Username.TableName;&lt;br /&gt;&lt;br /&gt;Example : Create Synonym SS For Scott.Student;&lt;br /&gt;&lt;br /&gt;Above example creates a synonym with name SS for student table in user scott. Now you can use SS to access student table of scott instead of scott.student. Public key word will create public synonym that can be used by all users in the database those have permissions on student table of scott.&lt;br /&gt;&lt;br /&gt;As other objects, a synonym can also be deleted. Syntax for deleting a synonym is as follows&lt;br /&gt;&lt;br /&gt;Syntax : Drop [ Public ] Synonym Sname;&lt;br /&gt;&lt;br /&gt;Example : Drop Synonym SS;&lt;br /&gt;&lt;br /&gt;If we use public key word to create a synonym then to delete that synonym we must use the key word public.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-7611116392268174436?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/7611116392268174436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=7611116392268174436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/7611116392268174436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/7611116392268174436'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/privilleges-and-roles.html' title='USER, PRIVILLEGES and ROLES'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-635527786970733967</id><published>2008-07-28T21:08:00.000-07:00</published><updated>2008-07-28T21:11:26.918-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>VIEWS</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;                            V I E W S&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;·         A view is like a window through which data on tables can be viewed or changed.&lt;br /&gt;·         A view is derived from another table or view, which is referred to as the base table of the view.&lt;br /&gt;·         A view is stored as a select statement only. It is a virtual table i.e. a table that doesn’t physically exist in its own right, but appears to the user as if it exists.&lt;br /&gt;·         A view has no data of its own. It manipulates data in the underlying base table.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Creating A View :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Syntax : Create [ OR REPLACE ] [ FORCE ] View&lt;br /&gt;   Vname [( Col1, Col2, Col3, … Col n )] As        &lt;br /&gt;   Select Statement [ WITH CHECK OPTION ]&lt;br /&gt;&lt;br /&gt;The “OR REPLACE“ option allows a view to be created even if one exists with that name already. Thus replacing the old version of the view for its owner. This means that the view can be altered without dropping and recreating.&lt;br /&gt;&lt;br /&gt;The “FORCE“ option creates the view even if the base table doesn’t exist or there are insufficient table privileges. However, the table must exist before the view is used.&lt;br /&gt;&lt;br /&gt;When you create a view with “ WITH CHECK OPTION ” then the view prevents a row from being inserted into the table that violates the condition given in Select statement.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Types Of Views&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            Depending on the select statement written for the creation of view, views are classified into two types.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Simple View : &lt;/strong&gt;If a view is created by using a select statement that retrieves data from a single table and doesn’t contain functions and Group By clause, then that view is called as a simple view.&lt;br /&gt;&lt;br /&gt;Example : Create Or Replace View EMP10 As Select * from EMP where Deptno = 10;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Complex View :&lt;/strong&gt; If a view is created by using a select statement that retrieves data from more than one table or contains functions or Group By clause then that view is called as a Complex view. Any DML operation is not possible on a Complex view.&lt;br /&gt;&lt;br /&gt;Example : Create Or Replace View EMPDEPT as Select Eno, Ename, Sal, E.Deptno,&lt;br /&gt;      Dname, LOC From EMP E, DEPT D where E.Deptno = D.Deptno;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Restrictions On Views :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;           &lt;br /&gt;Using “WITH CHECK OPTION” when the view is created can impose restrictions. There are other constraints to be aware of.&lt;br /&gt;&lt;br /&gt;Delete is prohibited if the view contains&lt;br /&gt;Join condition&lt;br /&gt;Group function&lt;br /&gt;Group By Clause&lt;br /&gt;Distinct command&lt;br /&gt;Row Num.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Update is prohibited if the view contains&lt;br /&gt;&lt;/strong&gt;1. Any of the above  &lt;br /&gt;2. Columns defined by expressions. ( like Sal * 12 )&lt;br /&gt;           &lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Insert is prohibited if the view contains&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;1. Any of the above&lt;br /&gt;            2. Any NOT NULL columns are not selected by the view.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Uses Of Views :&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Restricting access to database. Selecting from a view can display a restricted portion of database.&lt;br /&gt;Allowing users to make simple queries to retrieve results from complicated queries.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Deleting A View :&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Syntax : DROP VIEW  VIEW NAME&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-635527786970733967?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/635527786970733967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=635527786970733967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/635527786970733967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/635527786970733967'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/views.html' title='VIEWS'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-7992334647867270808</id><published>2008-07-28T20:42:00.000-07:00</published><updated>2008-07-28T20:48:00.694-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>SEQUENCES and CLUSTERS, PSUEDO COLUMNS</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;S E Q U E N C E S&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The sequence generator can be used to automatically generate sequence numbers for rows in a table. For example, you can use sequence generator to produce unique primary keys. In order to generate sequence number automatically you must define a sequence using create sequence statement. The create sequence statement has the following syntax.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br /&gt;    Create Sequence SeqName&lt;br /&gt;   Increment by n,&lt;br /&gt;   Start with n,&lt;br /&gt;   Minvalue n,&lt;br /&gt;   Maxvalue n,&lt;br /&gt;   Cycle/Nocycle;&lt;br /&gt;                       &lt;br /&gt;                        Here startwith specifies the value to be generated by the sequence when sequence was called for the first time. Increment by specifies the difference between the values generated by the sequence i.e. the increment for the old value, generated by the sequence to generate new value. Minvalue specifies the minimum value to be generated by the sequence. In general startwith and minvalue are same. Maxvalue specifies the maximum number to be generated by the sequence. Nocycle option specifies that the sequence will end when the value generated by the sequence equals to maxvalue. When nocycle option is used and sequence reaches maxvalue, then generating sequence numbers using that sequence is not possible. Cycle option specifies that when sequence reaches its maxvalue and user calls the sequence again, sequence will continue generating numbers starting from minvalue. It means that sequence will never end.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;Example :&lt;/strong&gt; Create Sequence SeqDno&lt;br /&gt;      Increment by 10&lt;br /&gt;      Start with 10&lt;br /&gt;      Minvalue 10&lt;br /&gt;      Maxvalue 100&lt;br /&gt;      NoCycle;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Generating Sequence Numbers&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Nextval :&lt;/strong&gt; The pseudo column “Nextval” is used to extract successive sequence number. When you refer to next value a new sequence number is generated. Nextval is mostly useful in DML statement.&lt;br /&gt;&lt;br /&gt;Syntax : SequenceName.Nextval&lt;br /&gt;Example : Insert into DEPT values(SeqDno.NEXTVAL, ‘ACCOUNTING’, ‘DALLAS’);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Currval :&lt;/strong&gt; The pseudo column “Currval” is used to refer to a sequence number that has just been generated. When you refer to Nextval for a given sequence, then the newly generated sequence number is placed in Currval.&lt;br /&gt;&lt;br /&gt;Syntax : SequenceName.Currval&lt;br /&gt;Example : Select SeqDno.Currval from Dual;&lt;br /&gt;&lt;br /&gt;Rules For Using Nextval And Currval&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Nextval and Currval may be used within&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The select clause of a Select Statement.&lt;br /&gt;The values list of an insert statement.&lt;br /&gt;The set clause of an update statement.&lt;br /&gt;Outermost select of a subquery.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Nextval and Currval may not be used within&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Within the select list of a view.&lt;br /&gt;With the keyword distinct.&lt;br /&gt;With the Order by, Group by or Having clauses of a select statement.&lt;br /&gt;With the set operators Union, Intersect, and Minus.&lt;br /&gt;Within a subquery.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Altering A Sequence :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Syntax:           Alter Sequence SeqName&lt;br /&gt;                        Increment by n&lt;br /&gt;                        Minvalue n&lt;br /&gt;                        Maxvalue n&lt;br /&gt;                        Cycle/Nocycle&lt;br /&gt;                       &lt;br /&gt;                        In Alter Sequnce command it is not possible to alter the startwith option specified during sequence creation. Alter Sequence command does not effect the numbers that are already generated by the sequence but effects only the values that are going to be generated by the sequence.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Deleting A Sequence :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Syntax : Drop Sequence SeqName;&lt;br /&gt;Example : Drop Sequence DnoSeq;&lt;br /&gt;====================================================================&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:180%;"&gt;P S E U D O  C O L U M N S&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;            Pseudo columns are the columns that are not present in a table but appears to the user as if they are the columns of a table. Pseudo columns in SQL are as follows.&lt;br /&gt;&lt;br /&gt;Sysdate &lt;br /&gt;NextVal &lt;br /&gt;CurrVal&lt;br /&gt;&lt;strong&gt;User :&lt;/strong&gt; Displays the current user name.&lt;br /&gt;&lt;strong&gt;UID :&lt;/strong&gt; Oracle assigns a unique ID to every user during creation of user. The pseudo column UID is used to get the unique ID assigned by Oracle to the current user.&lt;br /&gt;&lt;strong&gt;ROWID :&lt;/strong&gt; Oracle assigns a unique rowid to every row inserted in to a table. The pseudo column ROWID is used to get the unique ID assigned to the row of a table.&lt;br /&gt;&lt;strong&gt;ROWNUM :&lt;/strong&gt; Oracle assigns a number to every row of a table during its selection. The pseudo column ROWNUM is used to get the unique row number assigned by Oracle to the row of a table.&lt;br /&gt;LEVEL : Level pseudo column is used to get the level number of a row during tree walking.&lt;br /&gt;&lt;br /&gt;====================================================================&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;C L U S T E R S&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Clustering is a method of storing tables that are intimately related and often joined together into the same area on disk. The Cluster key is the column or columns by which tables are usually joined in a query.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Creating A Cluster :&lt;/span&gt;&lt;/strong&gt; A cluster is created by using the following syntax.&lt;br /&gt;&lt;br /&gt;Syntax : Create CLUSTER CLUSTERNAME&lt;br /&gt;   (ColName Datatype(Size), ColName Datatype(size),….);&lt;br /&gt;&lt;br /&gt;Example : Create Cluster STU_CLU (Sno Number(5));&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;After creating the cluster, a table can be created within that cluster as follows.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;            Create Table STUDENT&lt;br /&gt;            (Sno Number(5) Primary key,&lt;br /&gt;            Sname Varchar2(10),&lt;br /&gt;            Fee Number(10)&lt;br /&gt;            ) CLUSTER STU_CLU(Sno);&lt;br /&gt;&lt;br /&gt;                        To place tables on desired cluster we have to specify the cluster name on which we want to place the cluster at the end of create table statement after closing the parantheses. Along with cluster name we must also specify the cluster key column. In the above create table statement, student table is placed on cluster with name stu_clu. Like this you can place all related tables of student on same cluster. This will improve the database performance during data retrieval from these tables because all tables are stored in the same area on disk.&lt;br /&gt;&lt;br /&gt;            DML operations are not possible on a table that is created by using cluster option until an index is created on that cluster. Index is created on a cluster by using the following syntax.&lt;br /&gt;&lt;br /&gt;Syntax : Create Index Indexname On Cluster Clustername&lt;br /&gt;Example : Create Index STUCLU_IDX on Cluster STU_CLU;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Deleting A Cluster :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Syntax : Drop cluster clustername;&lt;br /&gt;Example : Drop Cluster STU_CLU;&lt;br /&gt;&lt;br /&gt;Note : Oracle will not allow the deletion of clusters that contain tables. Hence to delete a cluster we must first delete all tables created on that cluster.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;O N   D E L E T E   C A S C A D E&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;            We have created two tables Student and Marks by giving primary key constraint to Sno column of Student table and foreign key constraint on sno column of marks table that refers the Sno column of Student table. Now the student table is called as “Master Table” and Marks table is called as “Detailed Table”. Now if we want to delete a row from student table, which is having a dependent row or rows in Marks table will generate an error.&lt;br /&gt;           &lt;br /&gt;If we want to delete the dependent rows in foreign key table automatically when user is deleting the corresponding primary key row then “ON DELETE CASCADE” option is specified at the end of foreign key of Marks table.&lt;br /&gt;Example :&lt;br /&gt;&lt;br /&gt;Create  Table Marks&lt;br /&gt;( Sno Number(5) Constraint Sno_Fk References Student(Sno) On Delete Cascade,&lt;br /&gt;M1 Number(5),&lt;br /&gt;M2 Number(5),&lt;br /&gt;Tot Number(6));&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-7992334647867270808?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/7992334647867270808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=7992334647867270808' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/7992334647867270808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/7992334647867270808'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/sequences-and-clusters-psuedo-columns.html' title='SEQUENCES and CLUSTERS, PSUEDO COLUMNS'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-296705959737454361</id><published>2008-07-28T20:39:00.000-07:00</published><updated>2008-07-28T20:41:20.925-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>INDEXES IN ORACLE</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;I N D E X E S&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In Oracle indexes have two main purposes. They are&lt;br /&gt;&lt;br /&gt;i.)                  To speed up the retrieval of rows via a particular key&lt;br /&gt;ii.)                 To enforce uniqueness on values in a column.&lt;br /&gt;&lt;br /&gt;            The use of indexes is strongly recommended to achieve better performance. Once created, oracle will use the index whenever possible to speed up the data retrieval and this use is automatic and usually requires no action by the user who need never know of the existence of the index. Oracle will automatically create index on unique or primary key columns when the table was created.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Creating An Index :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Syntax :&lt;/strong&gt; Create [Unique][Bitmap] Index idxname On Tabname(Col1, Col2, Col3,… , Col n);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example :&lt;/strong&gt; Create Index DNOIDX On EMP(Deptno);&lt;br /&gt;&lt;br /&gt;This will create an index with name DNOIDX on Deptno column of EMP table.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Types Of Indexes :&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Single Column Index :&lt;/strong&gt; If an index is created on a single column of a table then that index is called as a Single Column Index.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Concatenated Index :&lt;/strong&gt; If an index is created on more than one column of a table then that index is called as Concatenated Index.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Unique Index :&lt;/strong&gt; Unique indexes are created by using unique keyword in the create index command. The purpose of unique index is to enforce uniqueness on the column even unique or primary constraint is not given on that column.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Non-Unique Index :&lt;/strong&gt; An index created without unique key word is called as a non-unique index.&lt;br /&gt;Bitmap Index : The bitmap index is created by using bitmap keyword in the create index command. The difference between normal and bitmap index is in bitmap indexes the identification of rows is in the form of binary digits i.e. 0, 1.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;When Oracle Uses Index :&lt;/strong&gt; Oracle will not use the index whenever user retrieves data from a table. Oracle uses index in the following situations.&lt;br /&gt;When the indexed column is referenced in where clause.&lt;br /&gt;Oracle will not use the index when the indexed column is used as a part of a function in where clause. (Ex : Upper(Ename))&lt;br /&gt;When a concatenated index is created, all columns listed in the index must be used in the where clause to use index by Oracle.&lt;br /&gt;&lt;br /&gt;We can create an Index on a column that allows function-based access. For this during the creation of index specify the column name along with function name.&lt;br /&gt;&lt;br /&gt;Example: Create Index EnameIdx On EMP(UPPER(Ename));&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Deleting An Index :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Syntax : Drop Index IndexName;&lt;br /&gt;&lt;br /&gt;Example : Drop Index DnoIdx;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-296705959737454361?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/296705959737454361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=296705959737454361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/296705959737454361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/296705959737454361'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/indexes-in-oracle.html' title='INDEXES IN ORACLE'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-1115372190121330976</id><published>2008-07-28T20:29:00.000-07:00</published><updated>2008-07-28T20:36:38.481-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>PL-SQL</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;Introduction to PL-SQL&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Oracle uses SQL as its primary language for solving any type of Queries. As SQL is a fourth generation language, it is very easy to use and flexible for the user. Even though SQL is very easier and flexible, some complex queries will not be solved by SQL. To solve the complex queries that are not solved by SQL Oracle introduces a procedural or Third generation language called PL/SQL (Procedural Structure Query Language).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;PL/Sql Featrues :&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;PL/SQL is a third generation or procedural language.&lt;br /&gt;Most of the PL/SQL language features are taken from the object oriented programming language ADA.&lt;br /&gt;As it is a procedural language, it provides the features like condition checking, looping, error handling etc.&lt;br /&gt;PL/SQL Programming is called as a Block structured programming.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Data Types :&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;            The keyword of a language that is used to specify the type of value that can be stored in a variable is called as Datatype. Data types in PL/SQL are as follows.&lt;br /&gt;&lt;br /&gt;Number&lt;br /&gt;Varchar2&lt;br /&gt;Char&lt;br /&gt;Long&lt;br /&gt;Long raw&lt;br /&gt;Raw&lt;br /&gt;Date&lt;br /&gt;Binary_Integer&lt;br /&gt;Pls_Integer&lt;br /&gt;Boolean&lt;br /&gt;Float&lt;br /&gt;Int&lt;br /&gt;&lt;br /&gt;Binary_Integer, Pls_Integer and int are used to store integer values. Although their purpose is same, internal memory representation is different. Float is used to store real values, number is used to store both integer and float values and Boolean is used to store True or False.&lt;br /&gt;Variable : An identifier used to identify a location in memory to store and access constants is called as a variable.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Declaration :&lt;/strong&gt; A statement in a language that associates a variables with its corresponding data type is called as Declaration statement. PL/SQL uses the following syntax for declaring a variable.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Syntax    :&lt;/strong&gt; Varname Datatype(Size) [ Constant ] [ Default / :=  Value] ;&lt;br /&gt;Example : Sno Number(5);&lt;br /&gt;                  Sno Number(5) := 0;&lt;br /&gt;                  Sno Number(5) Default 0;&lt;br /&gt;                  Sno Number(5) Constant := 20;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Operators In Pl/Sql :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            Arithmetic Operators              :           +,  -,  *,  /,  ** (Exponential operator)&lt;br /&gt;            Relational Operators               :           &lt;, &gt;, &lt;=, &gt;=, != / &lt;&gt; / ~=&lt;br /&gt;            Comparison Operator             :           =&lt;br /&gt;            Assignment Operator                         :           :=&lt;br /&gt;            Concatenation Operator         :          &lt;br /&gt;Comments in PL/SQL            :           --                      Single Line Comment&lt;br /&gt;                                                            /*…*/               Multiple Line Comment&lt;br /&gt;Note : For the Output to be printed on Screen as a result of any program/procedure, you need to …&lt;br /&gt;SQL&gt; Set Severoutput On&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;PROGRAMMING  LOGICS :&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;/span&gt;&lt;br /&gt;            In any language programming logic is of three types.&lt;br /&gt;            1. Sequence                            2. Selection                             3. Iteration&lt;br /&gt;SEQUENCE : Executing the program instructions from start to end in a sequence without skipping any statements and without repeated execution of any statements is called as a Sequence.&lt;br /&gt;SELECTION : Executing the program instructions by selection based on a condition is called as Selection. Selection is again three types.&lt;br /&gt;SINGLE ALTERNATIVE : Specify the statement is to be executed when the given condition is true without specifying the statement to be executed when condition is false is called as a Single Alternative.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;     IF Condition THEN&lt;br /&gt;                        Statements&lt;br /&gt;                  END IF;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;DOUBLE ALTERNATIVE :&lt;/strong&gt; Specifying the statements to be executed for both true and false stages of a condition is called as double Alternative.&lt;br /&gt;Syntax :     IF Condition THEN&lt;br /&gt;                        Statemetns&lt;br /&gt;                  Else&lt;br /&gt;                              Statements&lt;br /&gt;                  END IF;&lt;br /&gt;&lt;strong&gt;MULTIPLE ALTERNATIVE :&lt;/strong&gt; Implementing the selection logic with more than one condition is called as multiple alternative.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;     IF Condition THEN&lt;br /&gt;                              Statements&lt;br /&gt;                  ELSIF Condition THEN&lt;br /&gt;                              Statements&lt;br /&gt;            ELSIF Condition THEN&lt;br /&gt;                        Statements&lt;br /&gt;            :&lt;br /&gt;            :&lt;br /&gt;            :&lt;br /&gt;            ELSE&lt;br /&gt;                        Statements&lt;br /&gt;            END IF;&lt;br /&gt;&lt;strong&gt;ITERATION :&lt;/strong&gt; Executing the program instructions repeatedly until the given condition is false is called as ITERATION or looping.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;WHILE :&lt;/strong&gt;&lt;br /&gt;            Syntax :           VAR INIT;&lt;br /&gt;                                    WHILE CONDITION&lt;br /&gt;                                    LOOP&lt;br /&gt;                                                Statements&lt;br /&gt;                                                INC/DEC VAR (Increase or Decrease variable )&lt;br /&gt;                                    END LOOP;&lt;br /&gt;&lt;strong&gt;LOOP :&lt;/strong&gt;&lt;br /&gt;            Syntax :           VAR INIT;&lt;br /&gt;                                    LOOP&lt;br /&gt;                                                Statements&lt;br /&gt;                                                INC/DEC VAR&lt;br /&gt;                                                EXIT WHEN Condition&lt;br /&gt;                                    END LOOP;&lt;br /&gt;&lt;strong&gt;FOR :&lt;br /&gt;&lt;/strong&gt;            Syntax :           FOR VAR IN SVAL..EVAL  ( Starting Value .. Ending Value )&lt;br /&gt;                                    LOOP&lt;br /&gt;                                                Statements&lt;br /&gt;                                    END LOOP;&lt;br /&gt;&lt;strong&gt;REVERSE FOR :&lt;br /&gt;&lt;/strong&gt;            Syntax :           FOR VAR IN REVERSE SVAL..EVAL&lt;br /&gt;                                    LOOP&lt;br /&gt;                                                Statements&lt;br /&gt;                                    END LOOP;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;strong&gt;PL / SQL BLOCKS :&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;            Basic unit of PL/SQL program is called as a BLOCK. A PL/SQL program is a collection of more than one Block. PL/SQL Blocks are classified into four types.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. ANONYMOUS BLOCKS :&lt;/strong&gt; A PL/SQL block without a name is called as Anonymous Block.&lt;br /&gt;&lt;strong&gt;2. NAMED BLOCKS :&lt;/strong&gt; A PL/SQL Block is created with a name is called as a NAMED BLOCK.&lt;br /&gt;&lt;strong&gt;3. SUB PROGRAMS :&lt;/strong&gt; Functions, Procedures and Packages of PL/SQL are called as sub&lt;br /&gt;programs.&lt;br /&gt;&lt;strong&gt;4. TRIGGERS :&lt;/strong&gt; Triggers are PL/SQL blocks that are given a name and stored within the database like subprograms. But Triggers are executed implicitly by Oracle depending on&lt;br /&gt;&lt;/span&gt;Triggering event without the intervention of user.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;ANONYMOUS BLOCKS :&lt;/span&gt;&lt;/strong&gt; &lt;br /&gt;A PL/SQL Block without a name is called as an Anonymous Block. These blocks are generally created once and used once as they are not stored in the database. Syntax for an anonymous block is …&lt;br /&gt;            DECLARE&lt;br /&gt;                        VAR DECLARATIONS&lt;br /&gt;            BEGIN&lt;br /&gt;                        EXECUTABLE STATEMENTS&lt;br /&gt;            EXCEPTION&lt;br /&gt;                        ERROR HANDLING ROUTINES&lt;br /&gt;            END;&lt;br /&gt;            DECLARE section is used to declare the variables and constants required by the program. BEGIN section is used to write the actual code of the program, exception section is used to write error handling code and the statement  END represents the end of the program.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à Write a PL/SQL block that accepts two numbers from user and prints the sum of those numbers.&lt;br /&gt;&lt;/strong&gt;                        DECLARE&lt;br /&gt;                                    A NUMBER(5):=&amp;A;&lt;br /&gt;                                    B NUMBER(5):=&amp;B;&lt;br /&gt;                                    C NUMBER(10);&lt;br /&gt;                        BEGIN&lt;br /&gt;                                    C := A + B;&lt;br /&gt;                                    DBMS_OUTPUT.PUT_LINE( ‘SUM =’  C );&lt;br /&gt;                        END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à Write a PL/SQL block that accepts two numbers from user and prints the sum of the two numbers.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;DECLARE&lt;br /&gt;    A NUMBER(5):=&amp;A;&lt;br /&gt;    B NUMBER(5):=&amp;B;&lt;br /&gt;    C NUMBER(5);&lt;br /&gt;BEGIN&lt;br /&gt;    C:=A+B;&lt;br /&gt;    DBMS_OUTPUT.PUT_LINE('SUM IS :  'C);&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à Write a PL/SQL block to accept marks in three subjects for a student and display his marks and average marks.&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;DECLARE&lt;br /&gt;  A NUMBER(3):=&amp;A;                                     &lt;br /&gt;  B NUMBER(3):=&amp;B;&lt;br /&gt;  C NUMBER(3):=&amp;C;&lt;br /&gt;  T NUMBER(3);&lt;br /&gt;  V NUMBER(5,2);&lt;br /&gt;BEGIN&lt;br /&gt;  T := A + B + C;&lt;br /&gt;  V := T/3;&lt;br /&gt;DBMS_OUTPUT.PUT_LINE('TOTAL IS : '  T );&lt;br /&gt;DBMS_OUTPUT.PUT_LINE('AVERAGE IS : '  V );&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à Write a PL/SQL block to determine whether a given number is even or odd.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;DECLARE&lt;br /&gt;            A NUMBER(10):=&amp;A;&lt;br /&gt;BEGIN&lt;br /&gt;            IF MOD(A,2) = 0  THEN&lt;br /&gt;                   DBMS_OUTPUT.PUT_LINE( A  ' IS AN EVEN NUMBER' );&lt;br /&gt;            ELSE&lt;br /&gt;                   DBMS_OUTPUT.PUT_LINE( A  '  IS ODD NUMBER’ );&lt;br /&gt;            END IF;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à Write a PL/SQL block to find the big number among the given three numbers.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;DECLARE&lt;br /&gt;    A NUMBER(10):=&amp;A;&lt;br /&gt;    B NUMBER(10):=&amp;B;&lt;br /&gt;    C NUMBER(10):=&amp;C;&lt;br /&gt;BEGIN&lt;br /&gt;  IF (A&gt;B) AND (A&gt;C) THEN&lt;br /&gt;         DBMS_OUTPUT.PUT_LINE( A  ' IS THE BIGGEST NUMBER.' );&lt;br /&gt;  ELSIF (B&gt;A) AND (B&gt;C) THEN&lt;br /&gt;         DBMS_OUTPUT.PUT_LINE( B  ' IS THE BIGGEST NUMBER ' );&lt;br /&gt;  ELSE&lt;br /&gt;         DBMS_OUTPUT.PUT_LINE( C  ' IS THE BIGGEST NUMBER ' );&lt;br /&gt;  END IF;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à Write a PL/SQL block to print 1 to 10 natural numbers.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;DECLARE&lt;br /&gt;    A NUMBER(10):=1;&lt;br /&gt;BEGIN&lt;br /&gt;    WHILE (A&lt;10)&lt;br /&gt;    LOOP&lt;br /&gt;    DBMS_OUTPUT.PUT_LINE( A );&lt;br /&gt;    A := A + 1;&lt;br /&gt;    END LOOP;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à The Same example with FOR Loop&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;DECLARE&lt;br /&gt;     A NUMBER(10):=1;&lt;br /&gt;BEGIN&lt;br /&gt;    FOR A IN 1..10&lt;br /&gt;    LOOP&lt;br /&gt;    DBMS_OUTPUT.PUT_LINE( A );&lt;br /&gt;    END LOOP;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à The Same example using LOOP&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;DECLARE&lt;br /&gt;  A NUMBER(10):=1;&lt;br /&gt;BEGIN&lt;br /&gt;  LOOP&lt;br /&gt;  DBMS_OUTPUT.PUT_LINE( A );&lt;br /&gt;  A := A + 1;&lt;br /&gt;  EXIT WHEN A &gt; 10;&lt;br /&gt;  END LOOP;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DECLARE&lt;br /&gt;  M NUMBER(37);&lt;br /&gt;  A NUMBER(37):=&amp;A;&lt;br /&gt;  R NUMBER(37):=0;&lt;br /&gt;BEGIN&lt;br /&gt;  WHILE A&gt; 0&lt;br /&gt;  LOOP&lt;br /&gt;  M := MOD(A,10);&lt;br /&gt;  R := (R*10)+M;&lt;br /&gt;  A := TRUNC(A/10);                                                                           &lt;br /&gt;  END LOOP;                                                                                                                  &lt;br /&gt;DBMS_OUTPUT.PUT_LINE(R);&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à The same program with LOOP.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;DECLARE&lt;br /&gt;  M NUMBER(5);&lt;br /&gt;  A NUMBER(5):=&amp;A;&lt;br /&gt;  R NUMBER(5):=0;&lt;br /&gt;BEGIN&lt;br /&gt;  LOOP&lt;br /&gt;  M=MOD(A,10);&lt;br /&gt;  R=R*10+M;&lt;br /&gt;  A= TRUNC(A/10);&lt;br /&gt;  EXIT WHEN A&lt;&gt;0;&lt;br /&gt;  END LOOP;&lt;br /&gt;DBMS_OUTPUT.PUT_LINE(R);&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à Write a program to reverse a string.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;DECLARE&lt;br /&gt;  LEN NUMBER(5);&lt;br /&gt;  STR VARCHAR2(20):='&amp;amp;STR';&lt;br /&gt;  REV  VARCHAR2(10);&lt;br /&gt;BEGIN&lt;br /&gt;  LEN:=LENGTH(STR);&lt;br /&gt;  WHILE(LEN&gt;0)&lt;br /&gt;  LOOP&lt;br /&gt;      REV:=REVSUBSTR(STR,LEN,1);&lt;br /&gt;      LEN := LEN-1;&lt;br /&gt;  END LOOP;&lt;br /&gt;  DBMS_OUTPUT.PUT_LINE(REV);&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à The same program using LOOP&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;DECLARE&lt;br /&gt;  LEN NUMBER(5);&lt;br /&gt;  STR VARCHAR2(20):='&amp;amp;STR';&lt;br /&gt;  REV  VARCHAR2(10);&lt;br /&gt;BEGIN&lt;br /&gt;      LEN:=LENGTH(STR);&lt;br /&gt;     LOOP&lt;br /&gt;      REV:=REVSUBSTR(STR,LEN,1);&lt;br /&gt;      LEN := LEN-1;&lt;br /&gt;      EXIT WHEN LEN=0;&lt;br /&gt;  END LOOP;&lt;br /&gt;  DBMS_OUTPUT.PUT_LINE(REV);&lt;br /&gt;END;&lt;br /&gt;&lt;strong&gt;                       &lt;br /&gt;à The same using FOR LOOP&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;DECLARE&lt;br /&gt;  LEN NUMBER(5);&lt;br /&gt;  STR VARCHAR2(20):='&amp;amp;STR';&lt;br /&gt;  REV  VARCHAR2(10);&lt;br /&gt;  i NUMBER(10);&lt;br /&gt;BEGIN&lt;br /&gt;      LEN:=LENGTH(STR);&lt;br /&gt;      FOR I IN REVERSE 1..LEN&lt;br /&gt;  LOOP&lt;br /&gt;      REV:=REVSUBSTR(STR,I,1);&lt;br /&gt;  END LOOP;&lt;br /&gt;  DBMS_OUTPUT.PUT_LINE(REV);&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;NAMED BLOCKS :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The PL/SQL blocks that are given a label prior to the declaration section are called as NAMED BLOCKS. Like ANANYMOUS block NAMED blocks are also not stored within the database. Hence these are also created once and used once.&lt;br /&gt;Syntax :&lt;br /&gt;            &lt;&lt;label&gt;&gt;&lt;br /&gt;            DECLARE&lt;br /&gt;                        VAR declaration&lt;br /&gt;            BEGIN&lt;br /&gt;                        EXECUTABLE STATEMENTS&lt;br /&gt;            EXCEPTION&lt;br /&gt;                        ERROR HANDLING ROUTINES&lt;br /&gt;            END LABEL&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à Write a PL/SQL block that accepts a number from user and prints in the sum of even numbers between 1 and that number.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;DECLARE&lt;br /&gt;    N NUMBER(10);&lt;br /&gt;    NUM NUMBER(10):=&amp;NUM;&lt;br /&gt;    EV NUMBER(10):=0;&lt;br /&gt;BEGIN&lt;br /&gt;     FOR NUM IN N..NUM&lt;br /&gt;     IF EV:=MOD(A,2)=0&lt;br /&gt;     SE:=SE+EV;&lt;br /&gt;     END IF;&lt;br /&gt;LOOP&lt;br /&gt;      DBMS_OUTPUT.PUT_LINE(SE);&lt;br /&gt;END LOOP;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à Write a program to accept a number and find the sum of the numbers from 1 to that number.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;DECLARE&lt;br /&gt;    A NUMBER(3):=&amp;A;&lt;br /&gt;    S NUMBER(10):=0;&lt;br /&gt;    I NUMBER(2):=1;&lt;br /&gt;BEGIN&lt;br /&gt;    LOOP                                                         &lt;br /&gt;    S := S + I;&lt;br /&gt;    I := I + 1;&lt;br /&gt;    EXIT WHEN I &gt; A;&lt;br /&gt;    END LOOP;&lt;br /&gt;DBMS_OUTPUT.PUT_LINE('SUM OF NUMBERS FROM 1 TO '  A  ' IS '  S);&lt;br /&gt;END;&lt;br /&gt;           &lt;br /&gt;&lt;strong&gt;à Write a PL/SQL block that accepts marks of a student in three subjects calculates the total, average and find his grade.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;DECLARE&lt;br /&gt;     A NUMBER(3):=&amp;A;&lt;br /&gt;     B NUMBER(3):=&amp;B;&lt;br /&gt;     C NUMBER(3):=&amp;C;&lt;br /&gt;     T NUMBER(3);&lt;br /&gt;     AV NUMBER(5,2);&lt;br /&gt;BEGIN&lt;br /&gt;    T := A + B + C;&lt;br /&gt;    AV := T/3;&lt;br /&gt;    IF ( AV &gt; 80 ) THEN&lt;br /&gt;    DBMS_OUTPUT.PUT_LINE('DISTINCTION WITH '  T  ' MARKS  AVERAGE OF '  AV);&lt;br /&gt;    ELSIF ( AV &gt; 60 ) THEN&lt;br /&gt;    DBMS_OUTPUT.PUT_LINE('FIRST CLASS WITH '  T  ' MARKS AVERAGE OF '  AV);&lt;br /&gt;    ELSIF ( AV &gt; 50 ) THEN&lt;br /&gt;    DBMS_OUTPUT.PUT_LINE('SECOND CLASS WITH '  T  ' MARKS AVERAGE OF '  AV);&lt;br /&gt;    ELSIF ( AV &gt; 35 ) THEN&lt;br /&gt;    DBMS_OUTPUT.PUT_LINE('THIRD CLASS WITH '  T   ' MARKS AVERAGE OF '  AV);&lt;br /&gt;    ELSE&lt;br /&gt;    DBMS_OUTPUT.PUT_LINE('SORRY THIS ONE FAILED WITH AN AVERAGE '  AV);&lt;br /&gt;    END IF;&lt;br /&gt;END;   &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à WRITE A PL/SQL BLOCK THAT ACCEPTS A STRING AND A SINGLE CHARACTER FROM USER AND FINDS THE NUMBER OF OCCURENCES OF GIVEN CHARACTER IN THE STRING.( ARM STRONG NUMBER)&lt;br /&gt;&lt;/strong&gt;DECLARE&lt;br /&gt;            NUM NUMBER(10) := &amp;NUM;&lt;br /&gt;            A NUMBER(10);&lt;br /&gt;            B NUMBER(10);&lt;br /&gt;            C NUBMER(10);&lt;br /&gt;            SUM NUMBER(10);&lt;br /&gt;BEGIN&lt;br /&gt;            a := MOD(NUM,10);&lt;br /&gt;            b := MOD(NUM,100)/10;&lt;br /&gt;            c := NUM/100;&lt;br /&gt;            SUM := POWER(a,3) + POWER(b,3) + POWER(c,3);&lt;br /&gt;            IF SUM = NUM&lt;br /&gt;DBMS_OUTPUT.PUT_LINE( ‘ARMSTRONG NUMBER’ );&lt;br /&gt;ELSE&lt;br /&gt;DBMS_OUTPUT.PUT_LINE( ‘NOT ARMSTRONG’ );&lt;br /&gt;END IF;&lt;br /&gt;END;&lt;br /&gt;à PRIME NUMBER&lt;br /&gt;DECLARE&lt;br /&gt;            NUM NUMBER(10) := &amp;NUM;&lt;br /&gt;            I NUMBER(10) := 2;&lt;br /&gt;            F NUMBER(10) ;= 0;&lt;br /&gt;BEGIN&lt;br /&gt;            WHILE I &lt; NUM&lt;br /&gt;            LOOP&lt;br /&gt;            IF MOD(NUM,I) = 0 THEN&lt;br /&gt;            F = 1;&lt;br /&gt;            END IF;&lt;br /&gt;            I = I+1;&lt;br /&gt;            END LOOP;&lt;br /&gt;            IF F=1 THEN&lt;br /&gt;            DBMS_OUTPUT.PUT_LINE( ‘NOT PRIME NUMBER’ );&lt;br /&gt;            ELSE                                                  &lt;br /&gt;           DBMS_OUTPUT.PUT_LINE( ‘PRIME NUMBER’ );&lt;br /&gt;           END IF;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à WRITE A PL/SQL BLOCK, GIVEN A STRING, CHARACTER AND FIND THE NO OF OCCURANCES OF THE CHARACTER IN THE STRING.&lt;br /&gt;&lt;/strong&gt;DECLARE&lt;br /&gt;            STR VARCHAR2(10) := ‘&amp;amp;STR’;&lt;br /&gt;            CH CHAR(1) := ‘&amp;amp;CH’;&lt;br /&gt;            POS NUMBER(2) := 0;&lt;br /&gt;            CNT NUMBER(2) := 0;&lt;br /&gt;BEGIN&lt;br /&gt;            POS = INSTR(STR, CH, 1, 1 );&lt;br /&gt;            WHILE POS &gt; 0&lt;br /&gt;            LOOP&lt;br /&gt;            CNT := CNT +1;&lt;br /&gt;            POS := INSTR( STR, CH, POS+1, 1 );&lt;br /&gt;            END LOOP;&lt;br /&gt;           DBMS_OUTPUT.PUT_LINE( CNT );&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;à WRITE A PL/SQL BLOCK TO ACCEPT VALUES FOR SNO, SNAME, COURSE, FEE AND INSERT THOSE VALUES INTO STUDENT TABLE.&lt;br /&gt;&lt;/strong&gt;DECLARE&lt;br /&gt;            SNO NUMBER(10) := &amp;SNO;&lt;br /&gt;            SNAME VARCHAR2(10) := ‘&amp;amp;SNAME’;&lt;br /&gt;            COURSE VARCHAR2(10) := ‘&amp;amp;COURSE’;&lt;br /&gt;            C NUMBER(10) := &amp;FEE;&lt;br /&gt;BEGIN&lt;br /&gt;            INSERT INTO STUDENT VALEUS ( SNO, SNAME, COURSE, FEE );&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;à&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-1115372190121330976?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/1115372190121330976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=1115372190121330976' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1115372190121330976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1115372190121330976'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/pl-sql.html' title='PL-SQL'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-4987098800616805460</id><published>2008-07-28T20:20:00.000-07:00</published><updated>2008-07-28T20:27:13.966-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>CURSORS</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;C U R S O R S&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;                        Whenever a SQL statement is in process, Oracle allocates a special memory area for that SQL statement. This memory area is called as context area. The rows retrieved by the given select statement are called as ACTIVE SET. Cursor is a pointer to the active set for accessing the rows of active set from PL/SQL.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;TYPES OF CURSORS :&lt;/span&gt;&lt;/strong&gt;  Cursors are of two types, Explicit cursors and Implicit cursors. A cursor that is created automatically by Oracle when a select statement is executed is called as an IMPLICIT cursors. A cursor that is created and processed by the user is called as an EXPLICIT cursor.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;EXPLICIT CURSOR :&lt;/strong&gt;&lt;/span&gt; A cursor i.e. declared by the user is called as an explicit cursor. Explicit cursors are declared by user. The code associated to those cursors must be written by the user. When using an explicit cursor, user has to follow four steps.&lt;br /&gt;1.      Cursor Declaration.&lt;br /&gt;2.      Opening cursor.&lt;br /&gt;3.      Fetching Cursor.&lt;br /&gt;4.      Closing  Cursor.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. CURSOR DECLARATION :&lt;/strong&gt; Cursor declaration assigns a name to the cursor and associates that cursor with a select statement that retrieves the rows, which the cursor has to point.                 &lt;br /&gt;&lt;br /&gt;Syntax : Cursor CursorName is select statement;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. OPENING CURSOR :&lt;/strong&gt; A cursor must be opened before accessing the rows pointed by the cursor. During open statement Oracle executes the select statement associated with the cursor and then points to the first row retrieved by the select statement.&lt;br /&gt;&lt;br /&gt;Syntax : Open CursorName;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. FETCHING DATA :&lt;/strong&gt; During this stage cursor retrieves the values of current record to local variables and then moves the pointer to the immediate next row.&lt;br /&gt;&lt;br /&gt;Syntax : Fetch CursorName Into Local variable list;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. CLOSING CURSOR :&lt;/strong&gt; A cursor must be closed after completing work with that cursor. During close stage Oracle closes the cursor and releases all memory resources used by the cursor.&lt;br /&gt;&lt;br /&gt;Syntax : Close CursorName;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;CURSOR ATTRIBUTES :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The keywords of PL/SQL that determine the status of a cursor or the number of rows retrieved by a fetch statement till the time etc. are called as cursor attributes. Cursor attributes in PL/SQL  are as follows.&lt;br /&gt;                        1.%FOUND&lt;br /&gt;                        2.%NOTFOUND                      &lt;br /&gt;                        3.%ISOPEN&lt;br /&gt;                        4.%ROWCOUNT&lt;br /&gt;&lt;strong&gt;1. %FOUND :&lt;/strong&gt; This attribute returns true if the previously written fetch statement retrieves a row. Otherwise it returns false.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. %NOTFOUND :&lt;/strong&gt; This attribute returns true when the previous fetch statement doesn’t return any row. Otherwise it returns false.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. %ISOPEN :&lt;/strong&gt; This attribute returns true if the cursor is already opened. Otherwise it returns false.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. %ROWCOUNT :&lt;/strong&gt; This attribute returns the number of rows fetched until now.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Write a PL/SQL block to access all rows of EMP table using a cursor and update salary based on following criteria.&lt;br /&gt;&lt;/strong&gt;                        SAL &gt;= 5000   300&lt;br /&gt;                        SAL &gt;= 3000   500&lt;br /&gt;                        ELSE                           750&lt;br /&gt;DECLARE&lt;br /&gt;                        S EMP.SAL%TYPE;&lt;br /&gt;                        CURSOR MYCUR IS SELECT EMPNO, SAL FROM EMP;&lt;br /&gt;                        ENO EMP.EMPNO%TYPE;&lt;br /&gt;BEGIN&lt;br /&gt;                        OPEN MYCUR;&lt;br /&gt;                        FETCH MYCUR INTO ENO, S;&lt;br /&gt;                        WHILE MYCUR %FOUND&lt;br /&gt;                        LOOP&lt;br /&gt;                        IF S&gt;=5000 THEN S:=S+300;&lt;br /&gt;                        ELSIF S&gt;=300 THEN S:=S+500;&lt;br /&gt;                        ELSE S:=S + 750;&lt;br /&gt;                        END IF;&lt;br /&gt;&lt;br /&gt;                        UPDATE EMP SET SAL = S WHERE EMPNO = ENO;&lt;br /&gt;                        FETCH MYCUR INTO ENO, S;&lt;br /&gt;                        END LOOP;&lt;br /&gt;                        CLOSE MYCUR;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;The same using LOOP&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;DECLARE&lt;br /&gt;    S EMP.SAL%TYPE;&lt;br /&gt;    CURSOR MYCUR IS SELECT EMPNO, SAL FROM EMP;&lt;br /&gt;    ENO EMP.EMPNO%TYPE;&lt;br /&gt; BEGIN&lt;br /&gt;    OPEN MYCUR;&lt;br /&gt;    LOOP&lt;br /&gt;    FETCH MYCUR INTO ENO, S;&lt;br /&gt;    EXIT WHEN MYCUR%NOTFOUND;&lt;br /&gt;    IF S &gt;= 5000 THEN S := S + 300;&lt;br /&gt;    ELSIF S &gt;= 300 THEN S := S + 500;&lt;br /&gt;    ELSE S := S + 750;&lt;br /&gt;    END IF;&lt;br /&gt;    UPDATE EMP SET SAL = S WHERE EMPNO = ENO;&lt;br /&gt;    END LOOP;&lt;br /&gt;    CLOSE MYCUR;&lt;br /&gt; END;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;CURSOR FOR LOOP&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;DECLARE&lt;br /&gt;                        EMPROW EMP%ROWTYPE;&lt;br /&gt;                        CURSOR MYCUR IS SELECT * FROM EMP;&lt;br /&gt;BEGIN&lt;br /&gt;                        FOR MYCUR IN EMPROW&lt;br /&gt;&lt;br /&gt;                        LOOP&lt;br /&gt;                        IF EMPROW.SAL &gt;= 5000 THEN&lt;br /&gt;                        EMPROW.SAL := EMPROW.SAL + 300;&lt;br /&gt;                        ELSIF EMPROW.SAL &gt;= 3000 THEN                                   NOT WORKING&lt;br /&gt;                        EMPROW.SAL := EMPROW.SAL + 500;&lt;br /&gt;                        ELSE&lt;br /&gt;                        EMPROW.SAL := EMPROW.SAL + 750;&lt;br /&gt;                        END IF;&lt;br /&gt;            UPDATE EMP SET SAL = EMPROW.SAL WHERE EMPNO = EMPROW.EMPNO;&lt;br /&gt;                        END LOOP;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Write a PL/SQL block to create a cursor on student table and print all student names who have no dues.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;DECLARE&lt;br /&gt;                        F STUDENT.FEE%TYPE;&lt;br /&gt;                        CURSOR MYCUR IS SELECT SNO, FEE FROM STUDENT;&lt;br /&gt;                        SN STUDENT.SNO%TYPE;&lt;br /&gt;BEGIN&lt;br /&gt;                        OPEN MYCUR;&lt;br /&gt;                        FETCH MYCUR INTO SN, F;&lt;br /&gt;                        WHILE MYCUR%FOUND&lt;br /&gt;                        LOOP&lt;br /&gt;                        IF F = 0 THEN&lt;br /&gt;                        DBMS_OUTPUT.PUT_LINE(SN);                  DON’T KNOW WORKING OR NOT&lt;br /&gt;                        END IF;&lt;br /&gt;                        FETCH MYCUR INTO SN, F;&lt;br /&gt;                        END LOOP;&lt;br /&gt;                        CLOSE MYCUR;&lt;br /&gt;                        END;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;The same with LOOP&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;DECLARE&lt;br /&gt;                        F STUDENT.FEE%TYPE;&lt;br /&gt;                        CURSOR MYCUR IS SELECT SNAME, FEE FROM STUDENT;&lt;br /&gt;                        SNA STUDENT.SNAME%TYPE;&lt;br /&gt;BEGIN&lt;br /&gt;                        OPEN MYCUR;&lt;br /&gt;                        LOOP&lt;br /&gt;                        FETCH MYCUR INTO SNA, F;&lt;br /&gt;                        EXIT WHEN MYCUR%NOTFOUND&lt;br /&gt;                        IF F = 0 THEN&lt;br /&gt;                        DBMS_OUTPUT.PUT_LINE(SNA);               &lt;br /&gt;                        END IF;&lt;br /&gt;                        END LOOP;&lt;br /&gt;                        CLOSE MYCUR;&lt;br /&gt;                        END;&lt;br /&gt;&lt;br /&gt;DECLARE&lt;br /&gt;                        EMPROW EMP%ROWTYPE;&lt;br /&gt;                        CURSOR MYCUR IS SELECT * FROM EMP;&lt;br /&gt;BEGIN&lt;br /&gt;                        FOR MYCUR IN EMPROW&lt;br /&gt;                        LOOP&lt;br /&gt;                        IF EMPROW.SAL &gt;= 5000 THEN&lt;br /&gt;                        EMPROW.SAL := EMPROW.SAL + 300;&lt;br /&gt;                        ELSIF EMPROW.SAL &gt;= 3000 THEN&lt;br /&gt;                        EMPROW.SAL := EMPROW.SAL + 500;&lt;br /&gt;                        ELSE&lt;br /&gt;                        EMPROW.SAL := EMPROW.SAL + 750;&lt;br /&gt;                        END IF;&lt;br /&gt;UPDATE EMP SET SAL = EMPROW.SAL WHERE EMPNO = EMPROW.EMPNO;&lt;br /&gt;                        END LOOP;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;PARAMETERISD CURSORS&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;                        We can also pass parameters to a cursor and select data based on that parameters. To declare a cursor as parameterized cursor syntax is as follows…&lt;br /&gt;Syntax: CURSOR CURNAME(PARAM1 DATATYPE, PARAM2 DATATYPE,… PARAM N DATATYPE ) IS SELECT STATEMENT;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Write a PL/SQL block that accepts a course from user and displays the names of all students who has due in that course.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;DECLARE&lt;br /&gt;                        C STUDENT.COURSE%TYPE;&lt;br /&gt;                        SN STUDENT.SNAME%TYPE;&lt;br /&gt;CURSOR MYCUR(PC STUDENT.COURSE%TYPE) IS SELECT SNAME, FEE FROM STUDENT WHERE COURSE = PC;&lt;br /&gt;                        F STUDENT.FEE%TYPE;&lt;br /&gt;BEGIN&lt;br /&gt;                        C := ‘COURSE’;&lt;br /&gt;                        OPEN MYCUR(C);&lt;br /&gt;                        FETCH MYCUR INTO SN, F;&lt;br /&gt;                        WHILE MYCUR%FOUND&lt;br /&gt;                        LOOP&lt;br /&gt;                        IF F &gt; 0 THEN&lt;br /&gt;                        DBMS_OUTPUT.PUT_LINE(SN);&lt;br /&gt;                        END IF;&lt;br /&gt;                        FETCH MYCUR INTO SN, F;&lt;br /&gt;                        END LOOP;&lt;br /&gt;                        CLOSE MYCUR;&lt;br /&gt;END;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;FOR UPDATE WITH CURSORS :&lt;/span&gt;&lt;/strong&gt; Whenever we are opening a cursor, a snapshot of the corresponding table is created as active set. Any changes made to the table that are committed before opening the cursors will reflect in the active set. If any changes are made to the table after opening the cursor will not reflect in the active set even they are committed.&lt;br /&gt;                        To avoid this problem we can use for update clause at the end of the select statement written for the cursor. Because of this the rows retrieved by the select statement associated with cursor will be locked and will not allow any changes in the table by other users. This lock will be released when cursor is closed.&lt;br /&gt;                        If any other user has locked the table or same rows retrieved by a cursor prior to opening the cursor with for update clause will hang the system and it will wait for the user to release the locks. To avoid system hanging you can use NOWAIT clause along with for update.&lt;br /&gt;Example :&lt;br /&gt;                        C STUDENT.COURSE%TYPE;&lt;br /&gt;                        SN STUDENT.SNAME%TYPE;&lt;br /&gt;                        CURSOR MYCUR(PC STUDENT.COURSE%TYPE) IS&lt;br /&gt;SELECT SNAME, FEE FROM STUDENT WHERE COURSE = ‘PC’ FOR UPDATE NOWAIT;&lt;br /&gt;F STUDENT.FEE%TYPE;&lt;br /&gt;- - - -  - -&lt;br /&gt;- - - -  - -&lt;br /&gt;END;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-4987098800616805460?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/4987098800616805460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=4987098800616805460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4987098800616805460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4987098800616805460'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/cursors.html' title='CURSORS'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-4083036950068915851</id><published>2008-07-27T18:57:00.000-07:00</published><updated>2008-07-27T19:00:57.741-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>SUB PROGRAMS, PROCEDURES, FUNCTIONS</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;S U B P R O G R A M S&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;                        The PL/SQL blocks discussed until now are called as Anonymous blocks or Named blocks. These blocks are not stored within the database and hence they are compiled each time they are executed and they can’t be called from any other PL/SQL block. Procedures and Functions in PL/SQL are the named blocks that are stored within the database. They can be called from other PL/SQL blocks and these are combinely called as SUBPROGRAMS.&lt;br /&gt;                        Functions and Procedures are similar to functions and Procedures of other third generation languages. The difference between a Function and Procedure is a function must return a value while a Procedure must not return a value.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;FUNCTIONS :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;                        Function is a PL/SQL block that performs a specified task and returns a value to the user.&lt;br /&gt;                    &lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;For creating a Function the following syntax is used.&lt;br /&gt;Syntax :&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt; CREATE OR REPLACE FUNCTION FUNCTIONNAME ( ARG1 IN/OUT/IN OUT DATATYPE, ARG2 IN/OUT/IN OUT DATATYPE, … , ARG N  INM/OUT/IN OUT DATATYPE ) RETURN TYPE IS/AS&lt;br /&gt;                        VARIABLE DECLARATION&lt;br /&gt;BEGIN&lt;br /&gt;                        EXECUTABLE STATEMENTS&lt;br /&gt;EXCEPTION&lt;br /&gt;                        ERROR HANDLING ROUTINES&lt;br /&gt;END FUNCTIONNAME;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;MODES OF PARAMETERS :&lt;/span&gt;&lt;/strong&gt;  To a function or procedure in PL/SQL, parameters  can be passed in three ways. They are In, OUT and IN OUT. The purpose of these modes is as follows.&lt;br /&gt;&lt;br /&gt;1.When a parameter is passed  in “ IN ” mode then the value of that parameter is read only within that function or procedure.&lt;br /&gt;&lt;br /&gt;2.When a parameter is passed in “ OUT ” mode then that parameter is write only within that function or procedure. Any changes made to the “ OUT ” parameter within a function or procedure will automatically change the value of its corresponding argument.&lt;br /&gt;&lt;br /&gt;3.When a parameter is passed in “ IN OUT ” mode then that parameter can be read and write within that function or procedure. Like OUT parameter any changes made to the IN OUT parameter will automatically reflect in corresponding argument.&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE FUNCTION TESTMODE ( A_IN IN NUMBER, A_OUT OUT NUMBER, A_INOUT IN OUT NUMBER ) RETURN BOOLEAN IS TEMP NUMBER(3);&lt;br /&gt;BEGIN&lt;br /&gt;                        TEMP      := A_IN;                   VALID&lt;br /&gt;                        A_IN       := TEMP;                  INVALID&lt;br /&gt;                        A_OUT    := TEMP;                 VALID&lt;br /&gt;                        TEMP      := A_OUT;               INVALID&lt;br /&gt;                        A_INOUT := TEMP;                 VALID&lt;br /&gt;                        TEMP      := A_INOUT;            VALID&lt;br /&gt;                        RETURN(TRUE);&lt;br /&gt;END TESTMODE;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;NOTE :&lt;/span&gt;&lt;/strong&gt; A function or procedure created with OUT or IN OUT parameters must be called from another PL/SQL block using variables as arguments in function or procedure call corresponding to OUT and IN OUT parameters. &lt;br /&gt;&lt;br /&gt;SOME PROGRAMMES ARE TO BE WRITTEN AS EXAMPLES.&lt;br /&gt;&lt;br /&gt;POSITIONAL AND NAMED NOTATIONS : CREATE OF REPLACE FUNCTION TOTAL&lt;br /&gt;                        ( M1     NUMBER(10),&lt;br /&gt;                          M2    NUMBER(10),&lt;br /&gt;                          M3    NUMBER(10)) RETURN NUMBER IS&lt;br /&gt;BEGIN&lt;br /&gt;                        RETURN( M1 + M2 + M3 );&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;If we take the above function as an example, it can be called by using following statement.&lt;br /&gt;                        T := TOTAL(10, 20, 30 );&lt;br /&gt;When the total function is called by using the above syntax, the value 10 is passed to the parameter M1, 20 is passed to M2 and the value 30 is passed to the third parameter M3. This type of argument passing is called as “ Positional Notation ” as argument is passed to the parameter depending on their position.&lt;br /&gt;                        The same example can be called by using the following statement.&lt;br /&gt;                        T := TOTAL( M1 =&gt; 10, M3 =&gt; 30, M2 =&gt; 20 );&lt;br /&gt;When the function “TOTAL” is called by using the above statement, value 10 is assigned to the parameter M1, 20 is assigned to M2 and 30 to M3. Notice that even the value 20 is in third position it is assigned to M2. This type of argument passing is called “ NAMED NOTATION ” as values are passed depending on the name of the parameters.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;DEFAULT VALUES FOR PARAMETERS :&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;                        We can assign default values to the parameters during the creation of procedure or function itself. When default values are specified for parameters then passing values to those parameters during function or procedure call becomes optional.&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE OR REPLACE FUNCTION TOTAL(M1 NUMBER, M2 NUMBER, M3 NUMBER,       M4 NUMBER := 0, M5 NUMBER := 0 ) RETURN IS&lt;br /&gt;BEGIN&lt;br /&gt;                        RETURN ( M1 + M2 + M3 + M4 + M5 );&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;In the above function TOTAL, last two parameters m4, m5 are given the default value 0.Hence during the total function call, passing values to these two parameters is optional. Hence we use the same TOTAL function for calculating totals of either three numbers or four numbers or five numbers. If the total function has M1 as default parameter and M2 and M3 are compulsory, again M4 as default and M5 as compulsory then to call the total function with three values we must use named notation as follows.&lt;br /&gt;&lt;br /&gt;T := TOTAL( M2 =&gt; 50, M3 =&gt; 40, M5 =&gt; 60 );&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;P R O C E D U R E S&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;                        Procedures are the PL/SQL blocks that performs the action specified by the user but doesn’t return any value. Procedures are also subprograms like functions. The main difference between Function and Procedure is a function should return a value while a procedure must not. A procedure is created by using the following Syntax.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Syntax :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE PROCEDURE PNAME ( PARAM 1 IN/OUT/IN OUT DATATYPE,&lt;br /&gt;PARAM 2 IN/OUT/IN OUT DATATYPE, … …, PARAM N IN/OUT/IN OUT DATATYPE) IS / AS&lt;br /&gt;LOCAL VARABLE DECLARATION&lt;br /&gt;BEGIN&lt;br /&gt;                        EXECUTABLE STATEMENTS&lt;br /&gt;EXCEPTION&lt;br /&gt;                        ERROR HANDLING ROUTINES&lt;br /&gt;END PROCEDURE.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Write a Procedure to accept the details of a student and insert then into student table.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;CREATE OR REPLACE PROCEDURE STUPRO( S_SNO STUDENT.SNO%TYPE, S_SNAME STUDENT.SNAME%TYPE, S_COURSE STUDENT.COURSE%TYPE) AS&lt;br /&gt;BEGIN&lt;br /&gt;                        INSERT INTO STUDENT VALUES(S_SNO, S_SNAME, S_COURSE);&lt;br /&gt;END STUPRO;&lt;br /&gt;&lt;br /&gt;If we want to call the procedure then we follow as follows…&lt;br /&gt;SQL&gt; EXECUTE STUPRO(1, ‘RAVI’, ‘ORACLE’ );&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Write a procedure to accept marks in three subjects, calculate total, average, grade and insert those values into main table.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;CREATE OR REPLACE PROCEDURE FIND&lt;br /&gt;                        ( S_M1 NUMBER, S_M2 NUMBER, S_M3 NUMBER ) AS&lt;br /&gt;                        ( S_TOT NUMBER(5), S_AVG NUMBER(5,2), S_GRADE VARCHAR2(10) )&lt;br /&gt;BEGIN&lt;br /&gt;                        S_TOT := TOTAL( S_M1, S_M2, S_M3, S_TOT, S_AVG, S_GRADE );&lt;br /&gt;                        INSERT INTO STUDENT VALUES ( S_M1, S_M2, S_M3,S_TOT,S_AVG,S_GRADE);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;LOCAL SUBPROGRAMS&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;                        A function or procedure can be declared within the declaration section of another function or procedure. When  a function or procedure is declared within another function or procedure then those functions and procedures are called as “LOCAL SUB PROGRAMS”. Local sub programs can be used within the function or procedure in which they are declared. But they can’t be used outside that procedure or function.&lt;br /&gt;&lt;br /&gt;à CREATE OR REPLACE PROCEDURE ADDMARKS( P_M1 MARKS.M1%TYPE,&lt;br /&gt;P_M2 MARKS.M2%TYPE, P_M3 MARKS.M3%TYPE, P_SNO MARKS.SNO%TYPE ) AS&lt;br /&gt;&lt;br /&gt;FUNCTION TOTAL ( M1 NUMBER, M2 NUMBER, M3 NUMBER ) RETURN NUMBER IS&lt;br /&gt;BEGIN&lt;br /&gt;                        RETURN ( M1 + M2 + M3 );&lt;br /&gt;END TOTAL;&lt;br /&gt;&lt;br /&gt;FUNCTION AVEG ( T NUMBER ) RETURN NUMBER IS&lt;br /&gt;BEGIN&lt;br /&gt;                        RETURN(T/3);&lt;br /&gt;END AVEG;&lt;br /&gt;&lt;br /&gt;FUNCTION GRADE ( A NUMBER ) RETURN VARCHAR2 IS&lt;br /&gt;G VARCHAR2(15);&lt;br /&gt;BEGIN&lt;br /&gt;                        IF A &gt; 80 THEN G := ‘DISTINCTION’ ;&lt;br /&gt;                        ELSIF A &gt; 60 THEN G := ‘FIRST ’;&lt;br /&gt;                        ELSIF A &gt; 50 THEN G := ‘SECOND’;&lt;br /&gt;                        ELSIF A &gt; 35 THEN G := ‘THIRD’;&lt;br /&gt;                        ELSE   G := ‘FAIL’;&lt;br /&gt;                        END IF;&lt;br /&gt;                        RETURN(G);&lt;br /&gt;END GRADE;&lt;br /&gt;&lt;br /&gt;TOT                 NUMBER(5);&lt;br /&gt;A                      NUMBER;&lt;br /&gt;G                     VARCHAR2(15);&lt;br /&gt;BEGIN&lt;br /&gt;                        TOT := TOTAL( P_M1, P_M2, P_M3 );&lt;br /&gt;                        A := AVEG(TOT);&lt;br /&gt;                        G := GRADE(A);&lt;br /&gt;INSERT INTO MARKS VALUES( P_SNO, P_M1, P_M2, P_M3, TOT, A, G );&lt;br /&gt;END ADDMARKS;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-4083036950068915851?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/4083036950068915851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=4083036950068915851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4083036950068915851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4083036950068915851'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/sub-programs-procedures-functions.html' title='SUB PROGRAMS, PROCEDURES, FUNCTIONS'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-2840821075659737751</id><published>2008-07-27T18:52:00.001-07:00</published><updated>2008-07-27T18:55:25.796-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>PACKAGES IN PL-SQL</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;P A C K A G E S&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;                        Packages are the third type of sub programs after functions and procedures. Like procedures and functions packages are also stored in the database. But unlike functions and procedures packages should not be used as local sub programs.&lt;br /&gt;                        A package consists of two parts, package specification and package body. Package specification consists of only the declaration of variables, functions and procedures that can be used globally.&lt;br /&gt;                        Package body consists of definitions for the functions and procedures that are declared within the package specification.&lt;br /&gt;                        The main purpose of a package is to group the related subprograms. As variables can also be declared within a package specification, another purpose of package is to declare the variables and cursors that can be used globally.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;PACKAGE SPECIFICATION :&lt;/strong&gt; Package specification of a package consists of the variables, cursors, declarations that can be used globally and the declarations of functions and procedures to be included within the package. A package specification was created by using the following syntax.&lt;br /&gt;Syntax: SQL&gt;             CREATE OR REPLACE PACKAGE PACKAGENAME IS/OR&lt;br /&gt;                        VAR DECLARATIONS&lt;br /&gt;                        CURSOR DECLARATIONS&lt;br /&gt;                        FUNCTION DECLARATIONS&lt;br /&gt;                        PROCEDURE DECLARATIONS&lt;br /&gt;                        END PACKAGENAME;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;EX :&lt;/strong&gt; CREATE OR REPLACE PACKAGE STUPACK AS                                                                  &lt;br /&gt;                        PROCEDURE ADDSTUDENT ( P_SNO STUDENT.SNO%TYPE,&lt;br /&gt;                                                                        P_SNAME STUDENT.SNAME%TYPE,&lt;br /&gt;                                                                        P_COURSE STUDENT.COURSE%TYPE);&lt;br /&gt;                        PROCEDURE DELSTUDENT ( P_SNO STUDENT.SNO%TYPE);&lt;br /&gt;                        END STUPACK;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;PACKAGE BODY :&lt;/strong&gt; Package body contains definitions for the functions and procedures declared in the package specification. Package specification and package body name must be same.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Package body creation has the following syntax.&lt;br /&gt;Syntax :&lt;/strong&gt;           CREATE OR REPLACE PACKAGE BODY PBNAME IS/AS&lt;br /&gt;                        FUNCTION FUNCTIONNAME( ARGU.LIST ) RETURN TYPE IS&lt;br /&gt;                        LOCAL VARIABLE DECLARATION&lt;br /&gt;                        BEGIN&lt;br /&gt;                        EXECUTABLE CODE&lt;br /&gt;                        EXCEPTION&lt;br /&gt;                        ERROR HANDLING&lt;br /&gt;                        END ENAME;&lt;br /&gt;                        PROCEDURE PNAME ( ARGU.LIST ) IS/AS&lt;br /&gt;                        LOCAL VARIABLE DECLARATION&lt;br /&gt;                        BEGIN&lt;br /&gt;                        EXECUTABLE CODE&lt;br /&gt;                        EXCEPTION&lt;br /&gt;                        ERROR HANDLING&lt;br /&gt;                        END PNAME.&lt;br /&gt;                        .&lt;br /&gt;                        .&lt;br /&gt;                        .                                                                                                                                  &lt;br /&gt;                        END PBNAME&lt;br /&gt;&lt;strong&gt;EXAMPLE :&lt;/strong&gt;     CREATE OR REPLACE PACKAGE BODY STUPACK AS&lt;br /&gt;                        PROCEDURE ADDSTUDENT ( P_SNO STUDENT.SNO%TYPE,&lt;br /&gt;                                                                        P_SNAME STUDENT.SNAME%TYPE,&lt;br /&gt;                                                                        P_COURSE STUDENT.COURSE%TYPE ) IS&lt;br /&gt;                        BEGIN&lt;br /&gt;                        INSERT INTO STUDENT VALUES ( P_SNO, P_SNAME, P_COURSE );&lt;br /&gt;                        END ADDSTUDENT;&lt;br /&gt;                        PROCEDURE DELSTUDENT ( P_SNO STUDENT.SNO%TYPE ) IS&lt;br /&gt;                        BEGIN&lt;br /&gt;                        DELETE FROM STUDENT WHERE SNO=P_SNO;&lt;br /&gt;                        END DELSTUDENT;&lt;br /&gt;                        END STUPACK;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;Write a package that includes function for calculating total, average and grade and procedure to insert a record into marks table.&lt;/strong&gt;&lt;br /&gt;                        CREATE OR REPLACE PACKAGE.STURECORD AS&lt;br /&gt;                        FUNCTION TOTAL (   S_M1 STUDENT.MM%TYPE,&lt;br /&gt;                                                            S_M2 STUDENT.MP%TYPE) RETURN NUMBER IS;&lt;br /&gt;                        FUNCTION AVERAGE( S_TOT STUDENT.TOTAL%TYPE ) RETURN NUMBER IS;&lt;br /&gt;                        FUNCTION GRADE ( S_AVERAGE STUDENT.AVERAGE%TYPE) RETURN VARCHAR2 IS;&lt;br /&gt;                        PROCEDURE INSERTRECORD ( S_SNO STUDENT.SNO%TYPE,&lt;br /&gt;                                                                                    S_M1 STUDENT.MM%TYPE,&lt;br /&gt;                                                                                    S_M2 STUDEMT.MP%TYPE);&lt;br /&gt;                        END STURECORD;&lt;br /&gt;PACKAGE BODY :&lt;br /&gt;                        CREATE OR REPLACE PACKAGE BODY STURECORD AS&lt;br /&gt;                        FUNCTION TOTAL (   S_M1 STUDENT.MM%TYPE,&lt;br /&gt;                                                            S_M2 STUDENT.MP%TYPE ) RETURN NUMBER IS&lt;br /&gt;                        BEGIN&lt;br /&gt;                        RETURN ( S_M1 + S_M2 );&lt;br /&gt;                        END TOTAL;&lt;br /&gt;                        FUNCTION AVERAGE ( S_TOT STUDENT.TOTAL%TYPE ) RETURN NUMBER IS&lt;br /&gt;                        BEGIN&lt;br /&gt;                        RETURN ( S_TOT/2 );&lt;br /&gt;                        END AVERAGE;&lt;br /&gt;                        FUNCTION GRADE ( S_AVERAGE STUDENT.AVG%TYPE ) RETURN VARCHAR2 IS&lt;br /&gt;                        GRADE VARCHAR2(10);&lt;br /&gt;                        BEGIN&lt;br /&gt;                        IF S_AVERAGE &gt; 90 THEN GRADE = ‘FIRST’;&lt;br /&gt;                        ELSIF S_AVERAGE &gt; 60 THEN GRADE = ‘SEC’;&lt;br /&gt;                        ELSE GRADE = ‘FAIL’;&lt;br /&gt;                        END IF;&lt;br /&gt;                        RETURN GRADE;&lt;br /&gt;                        END GRADE;&lt;br /&gt;                        PROCEDURE INSERTRECORD ( S_SNO STUDENT.SNO%TYPE,&lt;br /&gt;                                                                                    S_M1 STUDENT.MM%TYPE,&lt;br /&gt;                                                                                    S_M2 STUDENT.MP%TYPE ) IS&lt;br /&gt;                        TOT NUMBER(10);&lt;br /&gt;                        GRADE VARCHAR2(10);&lt;br /&gt;                        AVG NUMBER(10);&lt;br /&gt;                        BEGIN TOT := STURECORD.TOTAL( S_M1, S_M2 );&lt;br /&gt;                                    AVG := STURECORD.AVERAGE(TOT);&lt;br /&gt;                                    GRADE := STURECORD.GRADE( AVG );&lt;br /&gt;INSERT INTO STUDENT VALUES ( S_SNO, S_M1, S_M2, TOT, AVG, GRADE );&lt;br /&gt;END INSERTRECORD;&lt;br /&gt;END STURECORD;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;OVERLOADING SUBPROGRAMS&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;                        We can crate more than one functionor procedure within a package with same name. When more than one function or procedure within a package are created with same name then those functions or procedures are said to be overloaded. The overloaded functions or procedures may have the same name, but the number of arguments and their datatypes may differ.&lt;br /&gt;EXAMPLE : CREATE OR REPLACE PACKAGE OVERLOADED AS&lt;br /&gt;                        PROCEDURE ADDSTUDENT ( P_SNO STUDENT.SNO%TYPE,&lt;br /&gt;                                                                        P_SNAME STUDENT.SNAME%TYPE,&lt;br /&gt;                                                                        P_COURSE STUDENT.COURSE%TYPE );&lt;br /&gt;                        PROCEDURE ADDSTUDENT (P_SNO STUDENT.SNO%TYPE,&lt;br /&gt;                                                                        P_MM STUDENT.MM%TYPE,&lt;br /&gt;                                                                        P_MP STUDENT.MP%TYPE );&lt;br /&gt;                        END OVERLOAD;&lt;br /&gt;&lt;strong&gt;EXAMPLE :&lt;/strong&gt; CREATE OR REPLACE PACKAGE BODY OVERLOADED IS&lt;br /&gt;                        PROCEDURE ADDSTUDENT ( P_SNO STUDENT.SNO%TYPE,&lt;br /&gt;                                                                        P_SNAME STUDENT.SNAME%TYPE,&lt;br /&gt;                                                                        P_COURSE STUDENT.COURSE%TYPE )&lt;br /&gt;                        BEGIN&lt;br /&gt;                        INSERT INTO STUDENT VALUES ( P_SNO, P_SNAME, P_COURSE );&lt;br /&gt;                        END ADDSTUDENT;&lt;br /&gt;                        PROCEDURE ADDSTUDENT (P_SNO STUDENT.SNO%TYPE,&lt;br /&gt;                                                                        P_M1 STUDENT.MM%TYPE,&lt;br /&gt;                                                                        P_M2 STUDENT.MP%TYPE ) IS&lt;br /&gt;                        TOT NUMBER(5);&lt;br /&gt;                        A NUMBER(5,2);&lt;br /&gt;                        G VARCHAR2(10);&lt;br /&gt;                        BEGIN&lt;br /&gt;                        TOT := TOTAL( P_M1, P_M2 );&lt;br /&gt;                        A := AVERAGE( TOT );&lt;br /&gt;                        G := GRADE(A);&lt;br /&gt;                        INSERT INTO STUDENT VALUES ( P_SNO, P_M1, P_M2, TOT, A, G );&lt;br /&gt;                        END ADDSTUDENT;&lt;br /&gt;                        END OVERLOAD;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;OVERLOADING IS NOT POSSIBLE IN FOLLOWING SITUTATIONS&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;1.When&lt;/strong&gt; the number of arguments and the datatypes are same, but the modes of parameters are different.&lt;br /&gt;Ex :                  PROCEDURE TEST( A1 IN NUMBER );&lt;br /&gt;                        PROCEDURE TEST( A1 OUT NUMBER );&lt;br /&gt;&lt;strong&gt;2.Overloading is not possible&lt;/strong&gt; when the functions are differed only in their return type.&lt;br /&gt;Ex:                   FUNCTION TEST ( A1 IN NUMBER ) RETURN NUMBER;&lt;br /&gt;                        FUNCTION TEST ( A2 IN NUMBER ) RETURN VARCHAR2;&lt;br /&gt;&lt;strong&gt;3.Overloading is not possible&lt;/strong&gt; when the parameters are different in their datatype and those datatypes are of same family.&lt;br /&gt;Ex :                  FUNCTION TEST ( A VARCHAR2 ) RETURN NUM;&lt;br /&gt;                        FUNCTION TEST ( A CHAR ) RETURN NUM;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-2840821075659737751?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/2840821075659737751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=2840821075659737751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/2840821075659737751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/2840821075659737751'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/packages-in-pl-sql.html' title='PACKAGES IN PL-SQL'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-1045542989135944306</id><published>2008-07-27T18:43:00.000-07:00</published><updated>2008-07-27T18:46:10.974-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>EXCEPTIONS IN PL-SQL</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;TYPES OF EXCEPTIONS&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;                        Exceptions in PL/SQL are classified into predefined exceptions and user defined exceptions. The exceptions that are already defined by Oracle are called as Predefined exceptions and the exceptions that are created by the user are called as User Defiend exceptions.&lt;br /&gt;Predefiend Exceptions : Predefiend exceptions are the exceptions that are already defiend by Oracle, and can be used directly with out any coresponding declaration statement. Predefiend exceptions and their purpose are as follows.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1.DUP_VAL_ON_INDEX :&lt;/strong&gt; This exception is raised when duplicate values are inserted into primary key or unique key  columns.&lt;br /&gt;&lt;br /&gt;                        DECLARE&lt;br /&gt;                        DNO NUMBER(10):=&amp;DN;&lt;br /&gt;                        DNA VARCHAR2(10):=‘&amp;amp;DNA’;&lt;br /&gt;                        L VARCHAR2(10):= ‘&amp;amp;L’;&lt;br /&gt;                        BEGIN&lt;br /&gt;                        INSERT INTO DEPT VALUES ( DNO, DNA, L);&lt;br /&gt;                        EXCEPTION&lt;br /&gt;                        WHEN DUP_VAL_ON_INDEX THEN&lt;br /&gt;                        DBMS_OUTPUT.PUT_LINE( ‘Duplicate value given to primary key column’ );&lt;br /&gt;                        End;&lt;br /&gt;&lt;strong&gt;2.NO_DATA_FOUND :&lt;/strong&gt; This exception is raised when a select statement doen’t return any value.&lt;br /&gt;                       &lt;br /&gt;                        DECLARE&lt;br /&gt;                        J EMP.JOB%TYPE;&lt;br /&gt;                        ENO EMP.EMPNO%TYPE := ‘&amp;amp;ENO’;&lt;br /&gt;                        BEGIN&lt;br /&gt;                        SELECT JOB INTO J FROM EMP WHERE EMPNO=ENO;&lt;br /&gt;                        EXCEPTION&lt;br /&gt;                        WHEN NO_DATA_FOUND THEN&lt;br /&gt;                        DBMS_OUTPUT.PUT_LINE(‘EMPNO NOT FOUND.’);&lt;br /&gt;                        END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3.TOO_MANY_ROWS :&lt;/strong&gt; This exception is raised when more than one rows are returned by a select statement.&lt;br /&gt;                        DECLARE&lt;br /&gt;                        J EMP.JOB%TYPE;&lt;br /&gt;                        EN EMP.ENAME%TYPE := ‘&amp;amp;ENAME’;&lt;br /&gt;                        BEGIN&lt;br /&gt;                        SELECT JOB INTO J FROM EMP WHERE EMPNO=ENO;&lt;br /&gt;                        EXCEPTION&lt;br /&gt;                        WHEN TOO_MANY_ROWS THEN&lt;br /&gt;                        DBMS_OUTPUT.PUT_LINE( ‘MORE THAN ONE RECORD RETURNED’ );&lt;br /&gt;                        END;&lt;br /&gt;&lt;strong&gt;4.INVALID_ NUMBER :&lt;/strong&gt; This excepton is raised when a non numeric is assigned to a numeric column.&lt;br /&gt;                        DECLARE&lt;br /&gt;                        BEGIN&lt;br /&gt;                        INSERT INTO EMP VALUES (  ‘AA’, ‘DNAME’, ‘LOC’ );&lt;br /&gt;                        EXCEPTION&lt;br /&gt;                        WHEN INVALID_NUMBER THEN&lt;br /&gt;                        DBMS_OUTPUT.PUT_LINE(‘NON NUMERIC VALUE IS GIVEN TO COLUMN’);&lt;br /&gt;                        END;&lt;br /&gt;&lt;strong&gt;5.VALUE_ERROR :&lt;/strong&gt; This exception is raised when a value larger than width of a variable s assigned to a variable.&lt;br /&gt;                        DECLARE&lt;br /&gt;                        C VARCHAR2(3);&lt;br /&gt;                        BEGIN&lt;br /&gt;C:= ‘ABCD’;&lt;br /&gt;                        EXCEPTION&lt;br /&gt;                                    WHEN VALUE_ERROR THEN&lt;br /&gt;                                    DBMS_OUTPUT.PUT_LINE(‘Value larger than specified width’);&lt;br /&gt;                        END;&lt;br /&gt;&lt;strong&gt;6.INVALID_CURSOR :&lt;/strong&gt; This exception will be raised when an invalid cursor operation is performed.&lt;br /&gt;            DECLARE&lt;br /&gt;            CURSOR CDEPT IS SELECT * FROM DEPT;&lt;br /&gt;            DNO DEPT.DNO%TYPE;&lt;br /&gt;            DN    DEPT.DN%TYPE;&lt;br /&gt;            L       DEPT.LOC%TYPE;&lt;br /&gt;            BEGIN&lt;br /&gt;                        FETCH CDEPT INTO DNO, DN, L;&lt;br /&gt;            EXCEPTION&lt;br /&gt;                        WHEN INVALID_CURSOR THEN&lt;br /&gt;                                    DBMS_OUTPUT.PUT_LINE(‘INVALID OPERATION ON CURSOR’ );&lt;br /&gt;                        END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;7.CURSOR_ALREADY_OPEN :&lt;/strong&gt; This exception will be raised when an User tries to open a cursor that is already open.&lt;br /&gt;            DECLARE&lt;br /&gt;            CURSOR CDEPT IS SELECT * FROM DEPT;&lt;br /&gt;            BEGIN&lt;br /&gt;            OPEN CDEPT;&lt;br /&gt;                        OPEN CDEPT;&lt;br /&gt;            EXCEPTION&lt;br /&gt;                        WHEN CURSOR_ALREADY_OPEN THEN&lt;br /&gt;                                    DBMS_OUTPUT.PUT_LINE(‘CURSOR IS ALREADY OPENED’ );&lt;br /&gt;                        END;&lt;br /&gt;8.ZERO_DIVIDE : This exception will be raised when a division is made by using Zero.&lt;br /&gt;9.STORAGE ERROR : This exception will be raised when PL/SQL runs out of memory.&lt;br /&gt;10.NOT_LOGGED_ON : This exception will be raised when you tried to execute an SQL statement against the database and database was not ready.&lt;br /&gt;11.LOGON_DENIED : This exception will be raised when an invalid username and password are given.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;USER DEFINED EXCEPTIONS&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Oracle also provides the ability to create users own exceptions. For this user has to declare an exception variable in Declaration section. After declaring an exception user has to raise it manually depending on a condition by using raised statement.&lt;br /&gt;            DECLARATION : Exception_Variable Exception;&lt;br /&gt;RAISING : Raise Exception_Variable;&lt;br /&gt;The following PL/SQL block created an user defined exception for handling the error raised when user inserts a foreign key violating value into deptno column of EMP table.&lt;br /&gt;DECLARE&lt;br /&gt;            ENO EMP.ENO%TYPE := &amp;ENO;&lt;br /&gt;                        EN EMP.ENAME%TYPE := ‘&amp;amp;EN’;&lt;br /&gt;                        J EMP.JOB%TYPE := ‘&amp;amp;J’;&lt;br /&gt;                        M EMP.MGR%TYPE := ‘&amp;amp;M’;&lt;br /&gt;                        HD EMP.HIREDATE%TYPE := ‘&amp;amp;HD’;&lt;br /&gt;                        S EMP.SAL%TYPE := &amp;S;&lt;br /&gt;                        C EMP.COMM%TYPE := &amp;C;&lt;br /&gt;                        DNO EMP.DEPTNO%TYPE := &amp;DNO;&lt;br /&gt;                        DNOFK EXCEPTION;&lt;br /&gt;            BEGIN&lt;br /&gt;                        IF DNO &gt; 40 THEN&lt;br /&gt;                        RAISE DNOFK;&lt;br /&gt;                        END IF;&lt;br /&gt;                        INSERT INTO EMP VALUES ( ENO, EN, J, M, HD, S, C, DNO );&lt;br /&gt;EXCEPTION&lt;br /&gt;                        WHEN DNOFK THEN&lt;br /&gt;            DBMS_OUTPUT.PUT_LINE(‘DEPTNO VALUES MUST BE 20, 30 OR 40’ );&lt;br /&gt;            END;&lt;br /&gt;“OTHERS” EXCEPTION HANDLER :The “OTHERS” handler will execute for all raised exceptions it should always be the last handler in the block. It is good programming practice that an others handler is placed at the top level of your program to ensure that no errors go and detected.&lt;br /&gt;SQL CODE AND SQL-ERRORS : Inside an “OTHERS” handler, it is often useful to know which Oracle error raised the exception. One reason would be to log which error occurred rather than the fact that an error happened. PL/SQL provides this information via to built in function, SQL code and SQLERRM. SQL code returns the current error code and SQL-Errm returns the current error message text.&lt;br /&gt;DECLARE&lt;br /&gt;            ENO EMP.ENO%TYPE := &amp;ENO;&lt;br /&gt;                        EN EMP.ENAME%TYPE := ‘&amp;amp;EN’;&lt;br /&gt;                        J EMP.JOB%TYPE := ‘&amp;amp;J’;&lt;br /&gt;                        M EMP.MGR%TYPE := ‘&amp;amp;M’;&lt;br /&gt;                        HD EMP.HIREDATE%TYPE := ‘&amp;amp;HD’;&lt;br /&gt;                        S EMP.SAL%TYPE := &amp;S;&lt;br /&gt;                        C EMP.COMM%TYPE := &amp;C;&lt;br /&gt;                        DNO EMP.DEPTNO%TYPE := &amp;DNO;&lt;br /&gt;                        DNOFK EXCEPTION;&lt;br /&gt;BEGIN&lt;br /&gt;                        IF DNO &gt; 40 THEN&lt;br /&gt;                        RAISE DNOFK;&lt;br /&gt;                        END IF;&lt;br /&gt;                        INSERT INTO EMP VALUES ( ENO, EN, J, M, HD, S, C, DNO );&lt;br /&gt;EXCEPTION&lt;br /&gt;                        WHEN DNOFK THEN&lt;br /&gt;            DBMS_OUTPUT.PUT_LINE(‘DEPTNO VALUES MUST BE 20, 30 OR 40’ );&lt;br /&gt;            WHEN DUP_VAL_ON_INDEX THEN&lt;br /&gt;            DBMS_OUTPUT.PUT_LINE( ‘DUPLICATE VALUES GIVEN TO EMP’ );&lt;br /&gt;            WHEN VALUE_ERROR THEN&lt;br /&gt;            DBMS_OUTPUT.PUT_LINE( ‘VALUE LONGER THAN SIZE OF COLUMN’ );&lt;br /&gt;            WHEN OTHERS THEN&lt;br /&gt;            DBMS_OUTPUT.PUT_LINE( SQL CODE  ’ : ’ SQLERRM );&lt;br /&gt;END;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-1045542989135944306?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/1045542989135944306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=1045542989135944306' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1045542989135944306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/1045542989135944306'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/exceptions-in-pl-sql.html' title='EXCEPTIONS IN PL-SQL'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-4211120245332723833</id><published>2008-07-27T18:30:00.000-07:00</published><updated>2008-07-27T18:51:52.090-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORACLE'/><title type='text'>TRIGGERS</title><content type='html'>&lt;strong&gt;&lt;span style="font-size:180%;"&gt;TRIGGERS&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;                        Triggers are PL/SQL blocks like functions, procedures, packages. Like procedures and functions triggers are also stored within the database. Like packages they doesn’t receive any arguments and they can’t be used as local blocks. Procedures and functions must be called externally by the user. But triggers are automatically executed depending on triggering event. Triggering event are the DML operations and executing a trigger is called as trigger firing.&lt;br /&gt;                        Triggers are mostly used for the following purposes.&lt;br /&gt;To define the complex constraints those are not possible to define at the time of table creation.&lt;br /&gt;To record the auditing information of table i.e. changes made to the table and who made those changes.&lt;br /&gt;To give instructions to other programs depending on the situtation.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;CREATING A TRIGGER :&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;                        Create trigger is used to create a trigger and it has the following syntax.&lt;br /&gt;à Syntax :      CREATE OR REPLACE TRIGGER TNAME&lt;br /&gt;                        BEFORE/AFTER INSERT OR UPDATE OR DELETE&lt;br /&gt;                        ON TABNAME&lt;br /&gt;                        [ FOR EACH ROW ]&lt;br /&gt;                        [ WHEN CONDITION ]&lt;br /&gt;                        DECLARE&lt;br /&gt;                                    VAR DECLARATION&lt;br /&gt;                        BEGIN&lt;br /&gt;                                    EXECUTABLE STATEMENTS;&lt;br /&gt;                        EXCEPTION&lt;br /&gt;                        ERROR HANDLING ROUTINES;&lt;br /&gt;                        END TNAME;&lt;br /&gt;&lt;br /&gt;                        Second line of the syntax specifies the triggering event when the trigger has to fire. This includes BEFORE / AFTER clause and one or more DML operations. For example if you write triggering event as BEFORE INSERT. Then the trigger is fired before inserting a row into the table.&lt;br /&gt;                        Third line of syntax specifies the table name on which trigger has to create.&lt;br /&gt;                        For EACH ROW clause specifies that the trigger is fired for each row which is affected by the DML operations. If we exclude EACH ROW clause then the trigger is fired only once for all rows that are affected by the DML operation.&lt;br /&gt;                        WHEN CONDITION clause specifies a condition when trigger has to fire during the triggering event and is optional.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;TYPES OF TRIGGERS :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; Triggers are classified into row level triggers and statement level triggers depending on the number of times trigger executes during the triggering event. The triggers that are executed once for each row affected by the DML operations are called as ROW LEVEL TRIGGERS. The triggers that are executed onlyonce for all rows affected by the DML operation are called as STATEMENT LEVEL TRIGGERS.    &lt;br /&gt;                        Depending on the triggering event triggers are classified into fourteen types.&lt;br /&gt;                       &lt;br /&gt;                        BEFORE INSERT      -           ROW LEVEL&lt;br /&gt;                        BEFORE UPDATE     -           ROW LEVEL&lt;br /&gt;                        BEFORE DELETE     -           ROW LEVEL&lt;br /&gt;                        BEFORE INSERT      -           STATEMENT LEVEL&lt;br /&gt;                        BEFORE UPDATE     -           STATEMENT LEVEL&lt;br /&gt;                        BEFORE DELETE     -           STATEMENT LEVEL&lt;br /&gt;                        AFTER INSERT          -           ROW LEVEL&lt;br /&gt;                        AFTER  UPDATE       -           ROW LEVEL&lt;br /&gt;                        AFTER  DELETE        -           ROW LEVEL&lt;br /&gt;                        AFTER INSERT          -           STATEMENT LEVEL&lt;br /&gt;                        AFTER  UPDATE       -           STATEMENT LEVEL&lt;br /&gt;                        AFTER  DELETE        -           STATEMENT LEVEL&lt;br /&gt;                        INSTEAD OF ( ORACLE 8.0 )            - ROW LEVEL&lt;br /&gt;                        INSTEAD OF                          - STATEMENT LEVEL&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Write a trigger that restricts the user from making any DML operations on SUNDAY.&lt;/strong&gt;&lt;br /&gt;                        CREATE OR REPLACE TRIGGER NOTRANS&lt;br /&gt;                        BEFORE UPDATE OR DELETE OR INSERT&lt;br /&gt;                        ON EMP&lt;br /&gt;                        DECLARE&lt;br /&gt;                                    W VARCHAR2(10) := TO_CHAR( SYSDATE, ‘DY’ );&lt;br /&gt;                        BEGIN&lt;br /&gt;                        IF W = ‘SUN’ THEN&lt;br /&gt;                          RAISE_APPLICATION_ERROR( -20000, ‘ NO TRANSACTION IS ALLOWED  ON SUNDAY’ );&lt;br /&gt;END IF;&lt;br /&gt;END NOTRANS;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;BIND VARIABLES OR PSEUDO RECORDS :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;                        Two pseudo records :OLD and :NEW can be used with row level triggers. :OLD is used to access the values of a record before it is updated and :NEW is used to access the values of a record after update.&lt;br /&gt;                        :OLD and:NEW are worked with DML operations as follows.&lt;br /&gt;&lt;br /&gt;INSERT&lt;br /&gt;UPDATE&lt;br /&gt;DELETE&lt;br /&gt;:OLD&lt;br /&gt;NOT POSSIBLE&lt;br /&gt;POSSIBLE&lt;br /&gt;POSSIBLE&lt;br /&gt;:NEW&lt;br /&gt;POSSIBLE&lt;br /&gt;POSSIBLE&lt;br /&gt;NOT POSSIBLE&lt;br /&gt;                       &lt;br /&gt;&lt;strong&gt;Write a trigger to record the auditing information of DEPT table.&lt;br /&gt;&lt;/strong&gt;                      &lt;br /&gt; CREATE OR REPLACE TRIGGER BEFUPD&lt;br /&gt;                        BEFORE UPDATE ON DEPT&lt;br /&gt;                        FOR EACH ROW&lt;br /&gt;                        BEGIN&lt;br /&gt;            INSERT INTO AUDITDEPT VALUES ( :NEW.DEPTNO, :NEW.DNAME,&lt;br /&gt;            :NEW.LOC, :OLD.DEPTNO, :OLD.DNAME, :OLD.LOC,&lt;br /&gt;                        ‘ UPDATED BY ’  USER  ‘ ON ’      TO_CHAR (SYSDATE, ‘DD-MON-YY&lt;br /&gt;                        HH.MI.SS.AM’ );&lt;br /&gt;                        END;&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE TRIGGER BFINSERT&lt;br /&gt;BEFORE INSERT ON DEPT&lt;br /&gt;FOR EACH ROW&lt;br /&gt;BEGIN&lt;br /&gt;INSERT INTO AUDITDEPT&lt;br /&gt;( DEPTNO, DNAME, LOC, REMARKS ) VALUES ( :NEW.DEPTNO, :NEWDNAME, :NEW.LOC, ‘INSERTED BY’  USER  ‘ON’ TO_CHAR ( SYSDATE, ‘DD-MON-YYHH.MI.SSAM ’ );&lt;br /&gt;END BFINSERT;&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE TRIGGER BDELETE&lt;br /&gt;BEFORE DELETE&lt;br /&gt;ON EMP&lt;br /&gt;FOR EACH ROW&lt;br /&gt;BEGIN&lt;br /&gt;INSERT INTO AUDITDEPT( ODEPTNO, ODNAME, OLOC ) VALUES&lt;br /&gt;( :OLD.DEPTNO, :OLD.DNAME, :OLD.LOC, ‘DELETED BY’  USER  ‘ON’  TO_CHAR( SYSDATE, ‘DD-MON-YY HH-MI-SS’ ));&lt;br /&gt;END BDELETE;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;TRIGGERING PREDICATES :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;                        When a trigger is written with more than one triggering event then we can identify the triggering event based on which the trigger was fired by using the the triggering predicates. Triggering predicates are as follws.&lt;br /&gt;INSERTING.&lt;br /&gt;DELETING.&lt;br /&gt;UPDATING.&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE TRIGGER AUDITDEPT&lt;br /&gt;BEFORE INSERT OR UPDATE OR DELETE&lt;br /&gt;ON DEPT&lt;br /&gt;FOR EACH ROW&lt;br /&gt;BEGIN                                                                      &lt;br /&gt;IF INSERTING THEN&lt;br /&gt;INSERT INTO AUDITDEPT ( DEPTNO, DNAME, LOC, REMARKS ) VALUES&lt;br /&gt;( :NEW.DEPTNO, :NEW.DNAME, :NEW.LOC, ‘INSERTED BY’  USER  ‘ON’  TO_CHAR(SYSDATE, ‘DD-MON-YY HH.MI.SS AM’ ));&lt;br /&gt;ELSIF UPDATING THEN&lt;br /&gt;INSERT INTO AUDITDEPT VALUES ( :NEW.DEPTNO, :NEW.DNAME, :NEW.LOC, :OLD.DEPTNO, :OLD.DNAME, :OLD.LOC, ‘UPDATED BY’  USER  ‘ON’  TO_CHAR( SYSDATE, ‘DD-MON-YY HH.MM.SS’ ));&lt;br /&gt;ELSE&lt;br /&gt;INSERT INTO AUDITDEPT ( ODEPTNO, ODNAME, OLOC, REMARKS ) VALUES&lt;br /&gt;( :OLD.DEPTNO, :OLD.DNAME, :OLD.LOC, ‘DELETED BY’  USER  ‘ON’  TO_CHAR( SYSDATE, ‘DD-MON-YY HH.MM.SS AM’ ));&lt;br /&gt;END IF;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Write a trigger that restricts the user from inserting a row into EMP table if the commission is more than 30% of the salary.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;CREATE OR REPLACE TRIGGER COMMISSION&lt;br /&gt;BEFORE INSERT OR UPDATE&lt;br /&gt;ON EMP&lt;br /&gt;FOR EACH ROW&lt;br /&gt;BEGIN&lt;br /&gt;IF :NEW.COMM &gt;= (:NEW.SAL*30/100) THEN&lt;br /&gt;RAISE_APPLICATION_ERROR( -20002, ‘COMM MUST BE LESS THAN 30% OF THE SALARY’ );&lt;br /&gt;END IF;&lt;br /&gt;END;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;strong&gt;INSTEAD OF TRIGGERS :&lt;/strong&gt;&lt;/span&gt; Instead of triggers are used to perform an action against a table in stead of the original operation performed by the user.&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE VIEW EMPDEPT&lt;br /&gt;AS&lt;br /&gt;SELECT EMPNO, ENAME, JOB, HIREDATE, D.DEPTNO, DNAME, LOC FROM&lt;br /&gt;EMP E, DEPT D WHERE E.DEPTNO = D.DEPTNO;&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE TRIGGER INSTEAD&lt;br /&gt;INSTEAD OF INSERT&lt;br /&gt;ON EMPDEPT&lt;br /&gt;FOR EACH ROW&lt;br /&gt;BEGIN&lt;br /&gt;INSERT INTO EMP VALUES ( :NEW.ENAME, :NEW.EMPNO, :NEW.LOC, :NEW.MGR, :NEW.HIREDATE, :NEW.SAL, :NEW.COMM, :NEW.DEPTNO );&lt;br /&gt;END INSTEAD;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;DATA DICTIONARY VIEWS ON TRIGGERS :&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;                        A list of triggers, event of those triggers the table name on which the trigger was created etc. can be get from the Data Dictionary View.&lt;br /&gt;USER_TRIGGERS :&lt;br /&gt;SEELCT * FROM USER_TRIGGERS;&lt;br /&gt;DISABLE / ENABLE THE TRIGGERS : Wecan disable or enable the trigger by using the follwing syntax.&lt;br /&gt;à ALTER TRIGGER TNAME ENABLE / DISABLE;&lt;br /&gt;Example :        Disable the trigger instins.&lt;br /&gt;                        SQL&gt; ALTER TRIGGER INSTINS;&lt;br /&gt;                        We can also enable or disable all triggers written on a table at a time by using the follwing syntax.&lt;br /&gt;                        SQL&gt; ALTER TABLE TABAME DISABLE / ENABLE ALL TRIGGERS;&lt;br /&gt;Example : The following statement disables all triggers on EMP table.&lt;br /&gt;                        SQL&gt; ALTER TABLE EMP DISABLE ALL TRIGGERS;&lt;br /&gt;&lt;br /&gt;DELETING A TRIGGER :&lt;br /&gt;SYNTAX :        SQL&gt; DROP TRIGGER TNAME;&lt;br /&gt;&lt;br /&gt;ORDER OF TRIGGER FIRING :&lt;br /&gt;                        BEFORE STATEMENT LEVEL&lt;br /&gt;                                    BEFORE ROW LEVEL&lt;br /&gt;                                                AFTER ROW LEVEL&lt;br /&gt;                                                            AFTER STATEMENT LEVEL&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;RESTRICTIONS ON TRIGGERS :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;            1.A trigger may not issue any transaction control statements, COMMIT, ROLLBACK or SAVEPOINT.&lt;br /&gt;2.Any procedures or functions that are called by the trigger body can not issue any transaction control statements.&lt;br /&gt;3.The trigger body can not declare any LONG or RAW variables also :NEW and :OLD can not refer to a LONG or a LONGRAW column in the table for which the trigger is defines.&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:180%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Triggers&lt;/strong&gt; in forms are fired depending on the user made action on them. The difference between trigger in forms and database triggers is the database triggers are fired depending on the DML events, while triggers in forms are fired depending on the user made action against the objects triggers in foms are classiffied into the following seven types.&lt;br /&gt;1. Interface Event Triggers.&lt;br /&gt;2. Mouse Event Triggers&lt;br /&gt;3. Transactional Triggers&lt;br /&gt;4. Query Processing Triggers&lt;br /&gt;5. Navigational Triggers&lt;br /&gt;6. New Object Triggers&lt;br /&gt;7. Validation Triggers&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;1. INTERFACE EVENT TRIGGERS :&lt;/span&gt;&lt;/strong&gt; The triggers that are fired, based on the user made action on the interface of the items are called as Interface Event Triggers.&lt;br /&gt;&lt;br /&gt;a) WHEN_BUTTON_PRESSED : This trigger will be fired whenever user clicks on a push button.&lt;br /&gt;b) WHEN_CHECKBOX_CHECKED : This trigger will be fired whenever user clicks on a checkbox at runtime.&lt;br /&gt;c) WHEN_RADIO_CHANGED : This trigger will be fired whenever user selects a new radio button within the radio group.&lt;br /&gt;d) WHEN_LIST_CHANGED : This trigger will be fired whenever user selects a new element within a list item.&lt;br /&gt;e) WHEN_LIST_ACTIVATED : This trigger will be fired whenever user activates a list item and this trigger is fired only for the list items of style Tlist.&lt;br /&gt;f) WHEN_IMAGE_PRESSED : This trigger will be fired whenever user clicks on an image item.&lt;br /&gt;g) WHEN_IMAGE_ACTIVATED : This trigger will be fired whenever user double clicks an image item.&lt;br /&gt;h) WHEN_TIMER_EXPIRED : This trigger will be fired whenever the user created timer expires.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;2. MOUSE EVENT TRIGGERS :&lt;/span&gt;&lt;/strong&gt; The triggers that are fired based on the user made action on the items using mouse are called as Mouse Event Triggers.&lt;br /&gt;&lt;br /&gt;a) WHEN_MOUSE_ENTER : This trigger will be fired whenever the mouse pointer enters into an item.&lt;br /&gt;b) WHEN_MOUSE_LEAVE : This trigger will be fired whenever the mouse pointer leaves an item.&lt;br /&gt;c) WHEN_MOUSE_MOVE : This trigger will be fired whenever the mouse pointer is moved over an item.&lt;br /&gt;d) WHEN_MOUSE_DOWN : This trigger will be fired whenever user pressed the mouse button.&lt;br /&gt;e) WHEN_MOUSE_UP : This trigger will be fired whenever user releases the mouse button.&lt;br /&gt;f) WHEN_MOUSE_CLICK : This trigger will be fired whenever user clicks on an item.&lt;br /&gt;g) WHEN_MOUSE_DOUBLECLICK : This trigger will be fired whenever user double clicks on an item.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;3. TRANSACTIONAL TRIGGERS :&lt;/span&gt;&lt;/strong&gt; The triggers that are fired depending on the DML operation performed by the user are called as Transactional Triggers.&lt;br /&gt;&lt;br /&gt;a) PRE_INSERT : This trigger will be fired just before inserting a record into the database.&lt;br /&gt;b) POST_INSERT : This trigger will be fired just after a record is inserted into the database.&lt;br /&gt;c) ON_INSERT : This trigger will be fired to replace the default behaviour of forms for insertion.&lt;br /&gt;d) PRE_UPDATE : This trigger will be fired just before updating a record to the database.&lt;br /&gt;e) POST_UPDATE : This trigger will be fired just after updating a record to the database.&lt;br /&gt;f) ON_UPDATE : This trigger will be fired to replace the default behaviour of forms for updation.&lt;br /&gt;g) PRE_DELETE : This trigger will be fired just before deleting a record from the database.&lt;br /&gt;h) POST_DELETE : This trigger will be fired just after deleting a record from the database.&lt;br /&gt;i) ON_DELETE : This trigger will be fired to replace the default behaviour of forms for deletion.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;4. QUERY PROCESSING TRIGGERS :&lt;/span&gt;&lt;/strong&gt; The triggers that are fired based on the query execution process are called as Query Processing Triggers.&lt;br /&gt;&lt;br /&gt;a) PRE_QUERY : This trigger will be fired just before executing a query against the database.&lt;br /&gt;b) POST_QUERY : This trigger will be fired once for each row retrieved from the database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;5. NAVIGATIONAL TRIGGERS :&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a) PRE_FORM : This trigger will be fired just before the focus enters into the first navigational item of first navigation datablock.&lt;br /&gt;b) POST_FORM : This trigger will be fired whenever the navigation control leaves the form.&lt;br /&gt;c) PRE_BLOCK : This trigger will be fired whenever a block is displayed for the first time.&lt;br /&gt;d) POST_BLOCK : This trigger will be fired whenever the focus transfers to a new data block.&lt;br /&gt;e) PRE_TEXT_ITEM : This trigger will be fired whenever the focus reaches a text item.&lt;br /&gt;f) POST_TEXT_ITEM : This trigger will be fired whenever the focus leaves the text item.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;6. NEW OBJECT TRIGGERS :&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;a) WHEN_NEW_FORM_INSTANCE : This trigger will be fired before a form is displayed for the first time.&lt;br /&gt;b) WHEN_NEW_BLOCK_INSTANCE : This trigger will be fired just before a block is displayed for the first time.&lt;br /&gt;c) WHEN_NEW_ITEM_INSTANCE : This trigger will be fired whenever the focus reaches an item other than the current item.&lt;br /&gt;d) WHEN_NEW_RECORD_INSTANCE : This trigger will be fired whenever the focus reaches a record other than the current record.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;7. VALIDATION TRIGGERS :&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;a) WHEN_VALDIATE_ITEM : This trigger will be fired whenever user is trying to leave an item.&lt;br /&gt;b) WHEN_VALIDATE_RECORD : This trigger will be fired whenever user is trying to leave a record.&lt;br /&gt;c) WHEN_VALIDATE_BLOCK : This trigger will be fired whenever user is trying to leave a block.&lt;br /&gt;d) WHEN_VALIDATE_FORM : This trigger will be fired whenever user is trying to leave a form.&lt;br /&gt;&lt;br /&gt;BUILT-INS : Built-ins are nothing but the pre-defined functions and procedures within forms. For example the following built-ins are used to perform the basic operations in forms runtime.&lt;br /&gt;&lt;strong&gt;1. EXECUTE_QUERY ( NO_VALIDATE ) :&lt;/strong&gt; This built-in is used to execute the select statement against the database and request the first record.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. ENTER_QUERY :&lt;/strong&gt; This built-in is used to take the block into enter query mode.&lt;br /&gt;&lt;strong&gt;3. FIRST_RECORD :&lt;/strong&gt; This built-in is used to display the first record of the current datablock.&lt;br /&gt;&lt;strong&gt;4. NEXT_RECORD :&lt;/strong&gt; This built-in is used to display the next record of the current record in the current datablock.&lt;br /&gt;&lt;strong&gt;5. PREVIOUS_RECORD :&lt;/strong&gt; This built-in is used to display the previous record of the current record in the current datablock.&lt;br /&gt;&lt;strong&gt;6. LAST_RECORD :&lt;/strong&gt; This built-in is used to display the last record of the current datablcok.&lt;br /&gt;&lt;strong&gt;7. CREATE_RECORD :&lt;/strong&gt; This built-in is used to create a new record for the current datablock.&lt;br /&gt;&lt;strong&gt;8. DELETE_RECORD :&lt;/strong&gt; This built-in is used to delete the current record of the current datablock.&lt;br /&gt;&lt;strong&gt;9. COMMIT / COMMIT_FORM :&lt;/strong&gt; This built-in is used to save the changes of the current datablock or all datablocks of a form module to the database.&lt;br /&gt;&lt;strong&gt;10. EXIT_FORM :&lt;/strong&gt; This built-in is used to close the forms at runtime.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-4211120245332723833?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/4211120245332723833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=4211120245332723833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4211120245332723833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/4211120245332723833'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/triggers.html' title='TRIGGERS'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-3363167641772496715</id><published>2008-07-27T17:58:00.000-07:00</published><updated>2008-07-27T18:08:32.587-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Requirements'/><title type='text'>Fresher job sites</title><content type='html'>Fresher job sites links&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.bixee.com/Fresher/jobs-in/Hyderabadwww.naukrihub.com/job-Openings/corporate/software-development-jobs/hyderabad1.html"&gt;www.bixee.com/Fresher/jobs-in/Hyderabad&lt;a href="http://www.naukrihub.com/job-O"&gt;www.naukrihub.com/job-O&lt;/a&gt;penings/corporate/software-development-jobs/hyderabad1.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.freshershome.com/jobs"&gt;www.freshershome.com/jobs&lt;/a&gt;&lt;a href="http://www.thisismyindia.com/jobs/hyderabad.html"&gt;www.thisismyindia.com/jobs/hyderabad.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.jobblogr.com/2008/02/28/bcom-mba-freshers-amazoncom-Hyderabad"&gt;www.jobblogr.com/2008/02/28/bcom-mba-freshers-amazoncom-Hyderabad&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.freshersdreams.com/"&gt;www.freshersdreams.com&lt;/a&gt;&lt;a href="http://www.yuvajobs.com/jobsview_all.asp"&gt;www.yuvajobs.com/jobsview_all.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.hyderabadjobs.thozhilmela.com/freshers-job"&gt;www.hyderabadjobs.thozhilmela.com/freshers-job&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/242256207435779424-3363167641772496715?l=softhydit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softhydit.blogspot.com/feeds/3363167641772496715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=242256207435779424&amp;postID=3363167641772496715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/3363167641772496715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/242256207435779424/posts/default/3363167641772496715'/><link rel='alternate' type='text/html' href='http://softhydit.blogspot.com/2008/07/fresher-job-sites.html' title='Fresher job sites'/><author><name>challagundla kartheek</name><uri>http://www.blogger.com/profile/12098030327757426891</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-242256207435779424.post-9005704329294046481</id><published>2008-07-26T17:16:00.000-07:00</published><updated>2008-09-09T21:53:52.358-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Server'/><title type='text'>SQL SERVER 2005 complete material</title><content type='html'>&lt;div&gt;SQL SERVER&lt;br /&gt;&lt;br /&gt;            SQL Server is a Database Management System (DBMS) created by Microsoft. In early days, File Management System is used for storing data permanently on secondary storage device and retrieves it back whenever necessary. But because of some drawbacks in file management system, a new data management system was developed, called as DBMS.&lt;br /&gt;&lt;br /&gt;File Management System&lt;br /&gt;&lt;br /&gt;In File Management System, data is organized in the form of Fields, Records and Files. A field is meaningful collection of characters, a record is collection of related fields and a file is collection of similar type of records. As an example you can observe the following table that contains student details.&lt;br /&gt;&lt;br /&gt;Fields&lt;br /&gt;Records&lt;br /&gt;File&lt;br /&gt;&lt;br /&gt;Sno&lt;br /&gt;Sname&lt;br /&gt;Course&lt;br /&gt;1&lt;br /&gt;SAI&lt;br /&gt;C&lt;br /&gt;2&lt;br /&gt;KRISHNA&lt;br /&gt;CPP&lt;br /&gt;3&lt;br /&gt;RAHUL&lt;br /&gt;ORACLE&lt;br /&gt;4&lt;br /&gt;SARMA&lt;br /&gt;DOT NET&lt;br /&gt;5&lt;br /&gt;PARDHU&lt;br /&gt;JAVA&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Drawbacks Of File Management System&lt;br /&gt;            The drawbacks of file management system that leads to the development of DBMS are as follows.&lt;br /&gt;Data Redundancy and Inconsistency : In file management system data is duplicated, which is called as redundancy. Because of this duplication memory is wasted and it is inconsistent for the user if he/she has to make changes to the duplicated data. This is because changing the data at one place will not reflect in all places where it is duplicated and user has to make the change at every place where it is duplicated.&lt;br /&gt;Atomicity Problem : “Either all the changes in a transaction must occur nor neither occur”. This rule is called atomicity rule and this rule is violated by the file management system, which is called as atomicity problem. For example, if the transaction is to transefer1000/- from Account A to Account B, the two steps in the transaction will be as follows.&lt;br /&gt;Deduct 1000/- from Account A&lt;br /&gt;Add 1000/- to Account B&lt;br /&gt;If there is a system failure or power failure after deducting amount from Account A and before adding this amount to Account B, then amount is deducted from account A but is not added to account B, which violates atomicity rule. According to atomicity rule, If second step is cancelled then first step must also be cancelled other wise second step must also be performed.&lt;br /&gt;Concurrent Access Anomolies : The problems that occur when more than one user try to access the same data in the same file are called as concurrent access anomalies. For example within a bank there is a joint Account A, whose balance amount is 5000/-. Two customers of the joint account are withdrawing amount from the Account A, at the same time from two different branches of the bank. One is withdrawing 500/- and another is withdrawing 1000/-. As both are withdrawing at the same time, balance amount is read as 5000 by both the computers. First computer will deduct 500/- and makes the remaining balance as 4500/-. Second computer will deduct 1000/- and will make the remaining balance as 4000/-. During the process of update only one can update data at a time. Hence finally balance will be shown either as 4500 or 4000 instead of the actual amount 3500/-.&lt;br /&gt;Security Problem : within file management system, if user got the write permission, he can insert new data, update existing data and he can also delete data from the file and it is not possible to restrict the user from updating or deleting data while allowing to insert new data.&lt;br /&gt;&lt;br /&gt;Database Management System (DBMS)&lt;br /&gt;            DBMS is based on databases. A database is defined as collection of inter-related data. DBMS is defined as collection of databases and a set of programs to work with databases. SQL Server is called as DBMS as it contains databases and a set of programs to work with databases. DBMS overcomes all the drawbacks of file management system. After inventing DBMS, several models are proposed stating various ways of representing data within the database and their advantages, called as data models. These data models are classified into three categories based on their purpose as follows.&lt;br /&gt;&lt;br /&gt;Physical Data Models&lt;br /&gt;Conceptual Data Models&lt;br /&gt;Logical Data Models&lt;br /&gt;&lt;br /&gt;Physical Data Models : The data models that concentrate on how the data is physically stored within the database are called as physical data models.&lt;br /&gt;&lt;br /&gt;Conceptual Data Models : The data models that concentrate on how the data and relationship between data can be represented diagrammatically are called as conceptual data models. One of the most popular conceptual model is Entity-Relationship Model(E-R Model).&lt;br /&gt;E-R model uses the terminology Entity, Attribute and Relationship.  An entity is a real world object stored within the database. If you store student information in the database, then student is called an entity, if you store employee information within the database, then employee is called an entity and so on. An attribute is a characteristic feature of the entity. For student entity sid, sname, course, address all these are called as attributes. A relationship is an association between entities. Relationship between entities are classified into one to one(1:1), one to many(1:M) and many to many(M:N).&lt;br /&gt;Within E-R diagrams an entity is represented with a rectangle, an attribute with oval shape and relationship with diamond shape. The E-R diagram for the entities Student and Course is as follows. The relationship type between course and student is one to many. This is because one student can join only one course and a course can be chosen by any number of students.&lt;br /&gt;Student&lt;br /&gt;Course&lt;br /&gt;SID&lt;br /&gt;Sname&lt;br /&gt;Course&lt;br /&gt;CID&lt;br /&gt;Cname&lt;br /&gt;Duration&lt;br /&gt;Joins&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                    M                                   1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Logical Data Models : The data models that concentrate on what data is stored in the database and what type of relationship exist between data are called as logical data models. The following lists of logical data models are available.&lt;br /&gt;1.      Hierarchical Data Model&lt;br /&gt;2.      Network Data Model&lt;br /&gt;3.      Relational Data Model&lt;br /&gt;4.      Object Data Model&lt;br /&gt;5.      Object Relational Data Model&lt;br /&gt;&lt;br /&gt;Hierarchical Data Model : in this data model data is organized hierarchically like in tree data structure. Within hierarchical database model it is not possible to represent many to many relationships. This drawback leads to the development of network data model. Student information can be represented in hierarchical data model as follows.&lt;br /&gt;&lt;br /&gt;College&lt;br /&gt;&lt;br /&gt;CID 1001&lt;br /&gt;&lt;br /&gt;CID 1002&lt;br /&gt;&lt;br /&gt;CID 1003&lt;br /&gt;&lt;br /&gt;SID 10001&lt;br /&gt;&lt;br /&gt;SID 10002&lt;br /&gt;&lt;br /&gt;SID 10010&lt;br /&gt;&lt;br /&gt;SID 10011&lt;br /&gt;Courses&lt;br /&gt;Students&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Network Data Model : in this data model also data is represented same as in case of hierarchical data model except that it can represent many to many relationship. Student information is represented in network data model as follows.&lt;br /&gt;&lt;br /&gt;College&lt;br /&gt;&lt;br /&gt;CID 1001&lt;br /&gt;&lt;br /&gt;CID 1002&lt;br /&gt;&lt;br /&gt;CID 1003&lt;br /&gt;&lt;br /&gt;SID 10001&lt;br /&gt;&lt;br /&gt;SID 10002&lt;br /&gt;&lt;br /&gt;SID 10010&lt;br /&gt;&lt;br /&gt;SID 10011&lt;br /&gt;Courses&lt;br /&gt;Students&lt;br /&gt;With&lt;br /&gt;Many To Many RelationShip With Course&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;           &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In both hierarchical and network data models, organization of data is very difficult as it is organized like a tree data structure. Especially deleting a record will be very complex process as all records that are based on deleted record must be rearranged. These drawbacks lead to the development of relational data model.&lt;br /&gt;&lt;br /&gt;Relational Data Model : Relational data model was proposed by E.F.Codd in 1970. He proposed the model theoretically and first practical implementation of relational model was System-R and is developed by IBM Corporation. In relational data model data is organized in the form of attributes, tuples and relations. Attribute, tuple and relation can be compared to a field, record and file in file management system. These are technical terms given by E.F. Codd and now a days these terms are replaced with column, row and table respectively.&lt;br /&gt;Attributes or&lt;br /&gt;Columns&lt;br /&gt;Tuples or Rows&lt;br /&gt;Relation or Table&lt;br /&gt;&lt;br /&gt;Sno&lt;br /&gt;Sname&lt;br /&gt;Course&lt;br /&gt;1&lt;br /&gt;SAI&lt;br /&gt;C&lt;br /&gt;2&lt;br /&gt;KRISHNA&lt;br /&gt;CPP&lt;br /&gt;3&lt;br /&gt;RAHUL&lt;br /&gt;ORACLE&lt;br /&gt;4&lt;br /&gt;SARMA&lt;br /&gt;DOT NET&lt;br /&gt;5&lt;br /&gt;PARDHU&lt;br /&gt;JAVA&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            As organization of data in relational data model is similar to file management system, it is very easy to maintain when compared to hierarchical and network data models. Now a days most of the DBMS are RDBMS. Examples are SQL Server, Oracle,DB2, MS Access etc.,&lt;br /&gt;&lt;br /&gt;Object Data Model : This data model is based on object oriented concepts of programming. This model provides OOP features within the database. This model also becomes popular as it has advantages of OOP. Examples are Object Store, Cactus etc.,&lt;br /&gt;&lt;br /&gt;Object Relational Data Model : this model combines the features of object data model with the features of relational data model. Hence this model has both the advantages of relational data model as well as object data model. Example is Oracle 8.0 onwards.&lt;br /&gt;&lt;br /&gt;Relational Data Model&lt;br /&gt;&lt;br /&gt;            Relational data model is proposed by E.F.Codd in 1970. First practical implementation of relational model is System-R developed by IBM Corporation. Later several DBMS are developed based on relational model and are called as relational database management system (RDBMS). SQL Server developed by Microsoft Corporation, Oracle developed by Oracle Corporation and DB2 developed by IBM Corporation are some examples of RDBMS.&lt;br /&gt;            In relational data model data is organized in the form of attributes, tuples and relations. The attribute, tuple and relation can be compared to a field, record and file in file management system. These are technical terms given by E.F. Codd and now a days these terms are replaced with column, row and table respectively.&lt;br /&gt;&lt;br /&gt;Attributes or&lt;br /&gt;Columns&lt;br /&gt;Tuples or Rows&lt;br /&gt;Relation or Table&lt;br /&gt;&lt;br /&gt;Sno&lt;br /&gt;Sname&lt;br /&gt;Course&lt;br /&gt;1&lt;br /&gt;SAI&lt;br /&gt;C&lt;br /&gt;2&lt;br /&gt;KRISHNA&lt;br /&gt;CPP&lt;br /&gt;NULL&lt;br /&gt;RAHUL&lt;br /&gt;ORACLE&lt;br /&gt;4&lt;br /&gt;SARMA&lt;br /&gt;DOT NET&lt;br /&gt;5&lt;br /&gt;PARDHU&lt;br /&gt;JAVA&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            Relational data model provides various constraints to maintain data integrity within the database. These constraints are called as integrity constraints. Integrity constraints supported by Relational data model are as follows.&lt;br /&gt;&lt;br /&gt;1. Not Null : if we insert a row into a table without providing value for a column, then the value in that column is called NULL value.  In the above student table third row is inserted without giving a value for sno column. Hence this row contains NULL for sno column. If you want to restrict the user from inserting a NULL value in to a column, then you can specify Not Null constraint on that column.&lt;br /&gt;&lt;br /&gt;2. Unique : when you don’t want to allow duplicate values in to a column, then you can specify unique constraint on that column. For example, if you take student table, sno must be unique i.e. sno given for one student must not be given to another student. To implement this condition on sno column, you have to specify unique constraint on sno column.&lt;br /&gt;&lt;br /&gt;3. Primary Key : when you specify primary key constraint on a column, then null values as well as duplicate values are not allowed into that column. A table must contain an attribute as primary key attribute to identify each row of the table uniquely.&lt;br /&gt;            i) Candidate Key : An attribute of the table that will uniquely identify every tuple of the table is called as candidate key. A table can contain more than one candidate key. Among all available candidate keys, the candidate key used by the user to identify the tuples uniquely is called as primary key. For example, if we take the Department table that contains Deptno, Dname and Location Columns, both Deptno and Dname Columns are candidate keys. But as we use Deptno to uniquely identify the rows of department table, Deptno is called as primary key.&lt;br /&gt;            ii) Secondary Key : An attribute that is used to uniquely identify the rows of the table when primary key fails is called as secondary key. For example, when we have to retrieve marks of a student, we will provide student’s hall ticket no. Here hall ticket no is primary key. If user lost his hall ticket no., then we can use student name and his father name combination to retrieve marks. Hence combination of these two columns is called as secondary key.&lt;br /&gt;&lt;br /&gt;4. Foreign Key : this constraint is used to create relationship between two tables. When you specify foreign key constraint on a column, you must specify a primary key column as reference to it. As a foreign key refers to a primary key, it is also called as referential integrity constraint. A foreign key constraint will restrict the user from inserting a value that doesn’t exist in the referenced primary key column.&lt;br /&gt;&lt;br /&gt;Normalization&lt;br /&gt;            The process of minimizing data redundancy through a series of steps called normal forms is called as normalization. Total normalization process includes 8 normal forms.&lt;br /&gt;First Normal Form (1NF)&lt;br /&gt;Second Normal Form (2NF)&lt;br /&gt;Third Normal Form (3NF)&lt;br /&gt;Boyce-Codd Normal Form (BCNF)&lt;br /&gt;Fourth Normal Form (4NF)&lt;br /&gt;Fifth Normal Form (5NF)&lt;br /&gt;Domain/Key Normal Form(DKNF)&lt;br /&gt;Sixth Normal Form(6NF)&lt;br /&gt;&lt;br /&gt;First Normal Form (1NF) : A relation is said to be in first normal form if and only if a primary key is defined for the relation and all non-key attributes are dependent on key attributes. The attributes that are part of primary key are called as key attributes and all remaining attributes are called as non-key attributes. As an example observe the following relation that contains information regarding various projects and employees working in those projects.&lt;br /&gt;&lt;br /&gt;PID&lt;br /&gt;Proj. Name&lt;br /&gt;EmpID&lt;br /&gt;Ename&lt;br /&gt;Job&lt;br /&gt;Charge/Hour&lt;br /&gt;Hours Worked&lt;br /&gt;P101&lt;br /&gt;College Maintenance&lt;br /&gt;1001&lt;br /&gt;A&lt;br /&gt;Sr. Programmer&lt;br /&gt;500&lt;br /&gt;3&lt;br /&gt;P101&lt;br /&gt;College Maintenance&lt;br /&gt;1007&lt;br /&gt;K&lt;br /&gt;DBA&lt;br /&gt;750&lt;br /&gt;2&lt;br /&gt;P101&lt;br /&gt;College Maintenance&lt;br /&gt;1003&lt;br /&gt;M&lt;br /&gt;Jr. Programmer&lt;br /&gt;300&lt;br /&gt;5&lt;br /&gt;P102&lt;br /&gt;Hospital Maintenance&lt;br /&gt;1001&lt;br /&gt;A&lt;br /&gt;Sr. Programmer&lt;br /&gt;500&lt;br /&gt;5&lt;br /&gt;P102&lt;br /&gt;Hospital Maintenance&lt;br /&gt;1005&lt;br /&gt;S&lt;br /&gt;DBA&lt;br /&gt;750&lt;br /&gt;3&lt;br /&gt;P102&lt;br /&gt;Hospital Maintenance&lt;br /&gt;1003&lt;br /&gt;M&lt;br /&gt;Jr. Programmer&lt;br /&gt;300&lt;br /&gt;5&lt;br /&gt;P102&lt;br /&gt;Hospital Maintenance&lt;br /&gt;1009&lt;br /&gt;R&lt;br /&gt;Jr. Programmer&lt;br /&gt;300&lt;br /&gt;4&lt;br /&gt;&lt;br /&gt;            In order to convert the above table to 1NF, a primary key must be defined for the table and all non-key attributes must be dependent on key attributes. In this table, it is not possible to define primary key on a single column as every column can contain duplicate values. Hence we can define primary key on the combination of PID and EMPID Columns. Now by giving the values of PID and EMPID columns, we can retrieve the values of every other column in the table. Hence the table is said to be in 1NF. Finally Table is represented as follows after defining a primary key on PID and EMPID columns.&lt;br /&gt;&lt;br /&gt;(PID,EMPID)        Pname, Ename, Job, Charge/Hour, Hours Worked&lt;br /&gt;&lt;br /&gt;Second Normal Form (2NF) : A relation is said to be in 2NF if and only if the relation is in first normal form and no partial dependencies exist in the relation. If primary key is defined on more than one attribute and a non-key attribute is completely dependent on only one key attribute then that dependency is called as partial dependency. The above table after conversion to 1NF, contains PID and EMPID combination as primary key. But to get PNAME there is no need to provide EMPID. Hence PNAME is partially dependent on key attributes. In the same way to get ENAME, JOB, CHARGE/HOUR and HOURS WORKED, there is no need to provide PID. Hence these attributes are also partially dependent on key attributes. The above relation is not in 2NF.&lt;br /&gt;            To convert the above relation to 2NF, we have to divide the table as follows.&lt;br /&gt;&lt;br /&gt;1. (PID)          Pname&lt;br /&gt;2. (EMPID)          Ename, Job, Charge/Hour&lt;br /&gt;3. (PID,EMPID)          Hours Worked&lt;br /&gt;&lt;br /&gt;            Now all three relations are said to be in 2NF, as they doesn’t contain partial dependencies.&lt;br /&gt;&lt;br /&gt;Third Normal Form (3NF) : A relation is said to be in 3NF, if and only if the relation is in 2NF and no transient dependencies exist in the relation. If a non-key attribute depends on another non-key attribute, then that dependency is called as transient dependency. In the above three tables that obtained by converting the table of 1NF to 2NF, second table contains CHARGE/HOUR column, which was actually dependent on JOB but not on EMPID. To convert this table, which was not in 3NF to 3NF, we have to divide the table as follows.&lt;br /&gt;&lt;br /&gt;1. (PID)          Pname&lt;br /&gt;2. (EMPID)          Ename, Job&lt;br /&gt;3. (JOB)           Charge/Hour&lt;br /&gt;3. (PID,EMPID)          Hours Worked&lt;br /&gt;&lt;br /&gt;            Now all the four tables are in 3NF, as they don’t contain transient dependencies.&lt;br /&gt;           &lt;br /&gt;            As the normalization steps proceed to higher normal forms, no. of tables in the database will increase. When no. of tables increases, the database performance will be reduced as we have to combine the data from more than one table. This is the reason why database designers are restricted to 3NF.&lt;br /&gt;&lt;br /&gt;De-normalization : Converting the tables from their current normal form to their previous normal form is called as de-normalization.&lt;br /&gt;INTRODUCTION TO SQL SERVER&lt;br /&gt;           &lt;br /&gt;                        SQL Server is a client-server Relational Database Management System developed by Microsoft Corporation. A client-server RDBMS is an RDBMS that can be shared. SQL Server is the RDBMS chosen as back end by most of the developers on Windows operating system. This is because&lt;br /&gt;It is tightly integrated with Windows&lt;br /&gt;It is easy to use as it provides wizards to perform various tasks like object creation, database tuning, backup etc.,&lt;br /&gt;It scales from mobile laptop to symmetric multi-processor systems.&lt;br /&gt;It provides business intelligence concepts, which are until now available only in oracle and other expensive DBMS’s.&lt;br /&gt;It is a bundle of at least four products Relational Database Engine, Analysis Services, Reporting Services and Integration Services. Relational Database Engine is used to work with database and database objects, analysis service is used to work with business intelligence concepts like data warehousing and data mining. Reporting Services is used to create and deploy enterprise reports and Integration Services is used to integrate data from different types of data sources to SQL Server.&lt;br /&gt;&lt;br /&gt;History Of SQL Server&lt;br /&gt;&lt;br /&gt;            SQL Server was developed and implemented by Sybase Corporation. In 1988, Microsoft licensed SQL Server for OS/2 operating system and began developing it for windows in early 1990. At almost the same time, further development of SQL Server for OS/2 has been cancelled. In 1994, Microsoft cancels the agreement with Sybase and starts developing SQL Server for windows. Since then several versions of SQL Server are released and the new version in the market is SQL Server 2005.&lt;br /&gt;&lt;br /&gt;New Features in SQL Server 2005&lt;br /&gt;           &lt;br /&gt;SQL Server 2000 provides Enterprise Manager to work with wizards and Query Analyzer to work with SQL queries. In SQL Server 2005, these two programs are combined into a single program called Management Studio.&lt;br /&gt;In today's connected world, data and the systems that manage that data must always be secure yet available to your users. With SQL Server 2005, users and information technology (IT) professionals across your organization will benefit from reduced application downtime, increased scalability and performance, and tight yet flexible security controls.&lt;br /&gt;SQL Server 2005 includes key enhancements to enterprise data management in Manageability, Availability, Scalability and Security areas.&lt;br /&gt;SQL Server 2005 makes it simpler and easier to deploy, manage, and optimize enterprise data and analytical applications.&lt;br /&gt;SQL Server 2005 simplifies management by providing one integrated management console to monitor and manage the SQL Server relational database, as well as Integration Services, Analysis Services, Reporting Services, Notification Services, and SQL Server Mobile Edition across large numbers of distributed servers and databases.&lt;br /&gt;Investments in high-availability technologies, additional backup and restore capabilities, and replication enhancements will enable enterprises to build and deploy highly available applications. Innovative high-availability features such as database mirroring; failover clustering, database snapshots, and enhanced online operations will minimize downtime and help to ensure that critical enterprise systems remain accessible.&lt;br /&gt;Database mirroring allows continuous streaming of the transaction log from a source server to a single destination server. In the event of a failure of the primary system, applications can immediately reconnect to the database on the secondary server. The secondary instance detects failure of the primary server within seconds and accepts database connections immediately.&lt;br /&gt;SQL Server 2005 introduces a dedicated administrator connection to access a running server even if the server is not responding or is otherwise unavailable. This allows you to execute diagnostic functions or Transact-SQL statements so you can troubleshoot problems on a server. The connection is activated by members of the sysadmin fixed server role and is only available through the SQLCMD command prompt tool either locally or from a remote computer.&lt;br /&gt;Scalability advancements such as table partitioning, snapshot isolation, and 64-bit support will enable you to build and deploy your most demanding applications using SQL Server 2005. The partitioning of large tables and indexes significantly enhances query performance against very large databases.&lt;br /&gt;SQL Server 2005 makes significant enhancements to the security model of the database platform, with the intention of providing more precise and flexible control to enable tighter security of the data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Management Studio&lt;br /&gt;           &lt;br /&gt;To work with SQL server 2005 databases and database objects, we have to use management studio. Management Studio provides the following windows.&lt;br /&gt;&lt;br /&gt;Registered Servers : this window displays all registered SQL Server servers on the current system. By using this window, you can also register a new SQ Server. To register a new SQL Server, right click on registered servers, then choose “register new server”, and then provide information required to register a server. Short cut to open registered servers window is Ctrl + Alt + G&lt;br /&gt;&lt;br /&gt;Object Explorer : this window will display all the databases, database objects, users and logins available in the selected server within registered servers window as a hierarchy. Whenever you want to work with wizards provided by management studio, you can use object explorer. Short cut to open object explorer window is F8&lt;br /&gt;&lt;br /&gt;Summary : this window will display all the objects available within the selected category in object explorer. You can work with the objects within summary window by double clicking on them or by right clicking on them and then choosing the corresponding option. Short cut to open summary window is F7&lt;br /&gt;&lt;br /&gt;Query Editor : this window is used to write SQL queries and execute them. Whenever you want to work with SQL Server using SQL commands, you can use query editor. Type the query within query editor and to execute it, use the shortcut F5. When there are multiple statements within query editor and you want to execute only one then select the statement you want to execute and then press F5. To open query editor click on New Query button in the toolbar.&lt;br /&gt;&lt;br /&gt;Connecting To Server&lt;br /&gt;&lt;br /&gt;            Whenever you open management studio immediately “connect to server” dialog box will displayed where you have to provide the following information to connect to a database server in the network&lt;br /&gt;&lt;br /&gt;Server Type : used to specify what type of server you want to connect to within SQL server. Various options available are Relational Database Engine, Analysis Services, Reporting Services and Integration Services.&lt;br /&gt;&lt;br /&gt;Server Name : used to specify the name of the database server within the network to which you want to connect to. If the database is within the local system, by default the local system name will be given as server name.&lt;br /&gt;Authentication Mode : SQL Server supports two types of authentication modes; Windows Authentication and SQL Server Authentication.&lt;br /&gt;In windows authentication mode, the user name and password you specify to login to windows operating system will be treat as login and password to login to SQL Server as well and in this mode there is no need to provide additional login and password to login to SQL Server. In this mode, SQL Server will not provide additional security for the data.&lt;br /&gt;In SQL Server authentication mode, in addition to user name and password you provide to login to windows, you have to provide login and password to login to SQL Server. In this mode, SQL Server will provide additional security for the data in addition to security provided by windows Operating System.&lt;br /&gt;&lt;br /&gt;Login And Password : if the mode is selected as SQL Server authentication mode, then valid login and password must be specified to login to SQL Server.&lt;br /&gt;&lt;br /&gt;            Whenever you try to register a new server using registered servers window, then also you have to provide the same information to register the server on the client system.&lt;br /&gt;&lt;br /&gt;TSQL (Transact SQL)&lt;br /&gt;                        SQL (Structured Query Language) is the common language for any RDBMS to work with the database. In SQL Server the SQL used to work with SQL Server database is called as TSQL. Actually SQL was developed by IBM corporation for their Relational project System – R as part of it. But later it was developed as a separate language and was given a name SEQUEL (Structured English Query Language). SEQUEL was renamed as SQL and was first commercially released by ORACLE Corporation. Features of SQL are as follows.&lt;br /&gt;SQL is a non-procedural or fourth generation language (4GL).&lt;br /&gt;SQL is not case sensitive&lt;br /&gt;In SQL we can break a single statement into multiple lines without using any continuation character.&lt;br /&gt;Commands of SQL are classified as follows.&lt;br /&gt;Data Definition Language (DDL) : The commands of SQL that are used to create database objects, alter the structure of the database objects and delete database objects from database are collectively called as DDL. Examples include Create, Alter and Drop Commands.&lt;br /&gt;Data Manipulation Language (DML) : The commands of SQL that are used to insert data into the database, modify the data of the database and to delete data from the database are collectively called as DML. Examples include Insert, Update and Delete.&lt;br /&gt;Data Query Language (DQL) : The commands of SQL that are used to retrieve data from the database are collectively called as DQL and example is Select.&lt;br /&gt;Data Control Language (DCL) : The commands of SQL that are used to control the access to data stored in the database are collectively called as DCL and examples include Grant and Revoke.&lt;br /&gt;Transaction Control Language (TCL) : The commands of SQL that are used to control the transactions made against the database are collectively called as TCL and examples include Commit, Rollback and Savepoint.&lt;br /&gt;&lt;br /&gt;Database&lt;br /&gt;            The primary object to create when you want to work with SQL Server is Database.  A single SQL Server can maintain 32,767 databases. Within SQL Server, a database is maintained with the help of operating system files. An SQL Server database uses two types of files, data file and Log file.&lt;br /&gt;Data files house the internal data the engine needs, along with any user defined data you place in the database. The database engine has a default data file, and you may add additional data files for storage or organizational reasons. A primary data file will have the extension .mdf and additional data files will have the extension .ndf.&lt;br /&gt;Log files are used to store any modifications made to data, and is heavily used in the process of committing and rolling back changes in the database.  A log file will have the extension .ldf.&lt;br /&gt;Creating A Database&lt;br /&gt;Syntax 1 : Create Database DBName&lt;br /&gt;            With this syntax SQL Server will create a database with specified name and will automatically create a data file and a log file for the database with default specifications.&lt;br /&gt;Example : Create Database MyDatabase&lt;br /&gt;Syntax 2 :&lt;br /&gt;Create Database DBName&lt;br /&gt;On&lt;br /&gt;(Name = Logical Name Of the Data File,&lt;br /&gt;FileName = ‘Physical Path and Name Of the Data File’,&lt;br /&gt;Size = initial memory to be allocated for the Data file,&lt;br /&gt;MaxSize = maximum allowed size for the Data file,&lt;br /&gt;Filegrowth = increment to the memory of the Data file&lt;br /&gt;)&lt;br /&gt;Log on&lt;br /&gt;(Name = Logical Name Of the Log File,&lt;br /&gt;FileName = ‘Physical Path and Name Of the Log File’,&lt;br /&gt;Size = initial memory to be allocated for the Log file,&lt;br /&gt;MaxSize = maximum allowed size for the Log file,&lt;br /&gt;Filegrowth = increment to the memory of the Log file&lt;br /&gt;)&lt;br /&gt;            Here on option is used to specify information related to Data File and log on option is used to specify the information related to Log File. Name option specifies the logical name of the file used by the SQL Server, FileName option is used specify the physical path and name of the file, Size option is used specify the initial memory to be allocated to the file. By default SQL Server will take it in MB and change it you can explicitly specify KB or any other measurement of memry. MaxSize option specifies the maximum allowed size for the file. It can be specified as unlimited to not to restrict the file growth. FileGrowth option is used to specify how much increment to be done the file whenever allocated memory is completely utilized by the file.&lt;br /&gt;Example :&lt;br /&gt;Create Database MyDatabase&lt;br /&gt;On&lt;br /&gt;(Name = MyDatabase_Dat,&lt;br /&gt;FileName = ‘D:\MyDatabase.Mdf’,&lt;br /&gt;Size = 5,&lt;br /&gt;MaxSize = 100,&lt;br /&gt;FileGrowth = 5&lt;br /&gt;)&lt;br /&gt;Log on&lt;br /&gt;(Name = MyDatabase_log,&lt;br /&gt;FileName = ‘D:\MyDatabase.Ldf’,&lt;br /&gt;Size = 5,&lt;br /&gt;MaxSize = 20,&lt;br /&gt;FileGrowth = 1&lt;br /&gt;)&lt;br /&gt;Syntax 3 : Create Database DBName as snapshot of Existing DBName&lt;br /&gt;            This syntax is used to create a copy of an existing database as a new database and this option is available only in SQL Server professional edition and is not available in Standard edition.&lt;br /&gt;Altering The Structure Of The Database&lt;br /&gt;            After creating the database you may have to create additional data files or log files to the database or delete a data file or log file or make modifications to file specification etc., for this purpose SQL server provides Alter Database command that has the following syntaxes.&lt;br /&gt;1. Alter Database DBName Add File (Data File Specification)&lt;br /&gt;            This syntax is used to add an additional data file to an existing database.&lt;br /&gt;2. Alter Database DBName Add Log File (Log File Specification)&lt;br /&gt;            This syntax is used to add an additional log file to an existing database.&lt;br /&gt;3. Alter Database DBName Remove File Logical Name Of The File&lt;br /&gt;            This syntax is used to delete a data file or log file from an existing database.&lt;br /&gt;&lt;br /&gt;4. Alter Database DBName Modify Name = NewDBName&lt;br /&gt;           &lt;br /&gt;            This syntax is used to change the name of the database i.e. renaming the database.&lt;br /&gt;&lt;br /&gt;5. Alter Database DBName Modify File (Name = LogicalName , Size=n , MaxSize=n , FileGrowth = n)&lt;br /&gt;&lt;br /&gt;            This syntax is used to change the file specification for an existing file of the database.&lt;br /&gt;&lt;br /&gt;Note : To get the information about an existing database use the system procedure “SP_HELPDB”.  This will display information about the data files and log files created for the database along with database information. Syntax will be as follows.&lt;br /&gt;SP_HELPDB ‘DBNAme’&lt;br /&gt;&lt;br /&gt;Deleting A Database&lt;br /&gt;            To delete a database from SQL server use Drop Database command. Syntax is as follows.&lt;br /&gt;Drop Database DBName&lt;br /&gt;&lt;br /&gt;Tables Or Relations&lt;br /&gt;            Whenever you want to store data into the SQL server database, first you have to create a table within the database and to create a table you have to specify columns required for the table along with the type of data you want to store in the table and constraints you want to check during the insertion or updating of the data in the table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Data Types In SQL Server&lt;br /&gt;&lt;br /&gt;Category&lt;br /&gt;Data Type&lt;br /&gt;Bytes&lt;br /&gt;Rannge&lt;br /&gt;Integer&lt;br /&gt;Tiny int&lt;br /&gt;1&lt;br /&gt;0 To 255&lt;br /&gt;&lt;br /&gt;Small int&lt;br /&gt;2&lt;br /&gt;-32768 To 32767&lt;br /&gt;&lt;br /&gt;Int&lt;br /&gt;4&lt;br /&gt;-2147483648 To 2147483647&lt;br /&gt;&lt;br /&gt;Big int&lt;br /&gt;8&lt;br /&gt;-263 To 263 – 1&lt;br /&gt;Float&lt;br /&gt;Decimal(P,S)&lt;br /&gt;5 to 17&lt;br /&gt;Decimal(7,2) will allow a total of 7 digits where 2 digits will be after the decimal point. (ex : 12345.67)&lt;br /&gt;&lt;br /&gt;Float(P)&lt;br /&gt;If P&lt;25  4 Bytes&lt;br /&gt;If P&gt;=25 8 Bytes&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Small Money&lt;br /&gt;4 Byte Decimal&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Money&lt;br /&gt;8 Byte Decimal&lt;br /&gt;&lt;br /&gt;Character&lt;br /&gt;Char (n)&lt;br /&gt;&lt;br /&gt;Fixed Length Char Data and n can be up to maximum 8000&lt;br /&gt;&lt;br /&gt;Varchar(n)&lt;br /&gt;&lt;br /&gt;Variable Length Char Data And n Can be up to maximum 8000&lt;br /&gt;&lt;br /&gt;NChar(n)&lt;br /&gt;a Unicode character will occupy 2 bytes in memory&lt;br /&gt;Fixed Length Unicode char data and n can be up to maximum 4000.&lt;br /&gt;&lt;br /&gt;Nvarchar(n)&lt;br /&gt;&lt;br /&gt;Variable Length Unicode char data and n can be up to maximum 4000.&lt;br /&gt;&lt;br /&gt;Text(n)&lt;br /&gt;n can be up to maximum 2GB&lt;br /&gt;Variable length char Data&lt;br /&gt;&lt;br /&gt;Ntext(n)&lt;br /&gt;N can be up to maximum 230 – 1&lt;br /&gt;Variable length Unicode char data&lt;br /&gt;Binary&lt;br /&gt;Binary(n)&lt;br /&gt;N can be up to maximum 8000&lt;br /&gt;Fixed length binary data&lt;br /&gt;&lt;br /&gt;VarBinary(n)&lt;br /&gt;N can be up to maximum 8000&lt;br /&gt;Variable Length Binary Data&lt;br /&gt;&lt;br /&gt;Image(n)&lt;br /&gt;N can be up to maximum 231 – 1&lt;br /&gt;Variable Length Binary data&lt;br /&gt;&lt;br /&gt;Bit&lt;br /&gt;1&lt;br /&gt;True/False/NULL&lt;br /&gt;Large Objects&lt;br /&gt;Varchar(Max)&lt;br /&gt;231 – 1&lt;br /&gt;Variable Length Char Data&lt;br /&gt;&lt;br /&gt;NVarchar(Max)&lt;br /&gt;231 – 1&lt;br /&gt;Variable Length Unicode Char Data&lt;br /&gt;&lt;br /&gt;VarBinary(Max)&lt;br /&gt;231 – 1&lt;br /&gt;Variable Length Binary Data&lt;br /&gt;DateTime&lt;br /&gt;SmallDatetime&lt;br /&gt;2&lt;br /&gt;Jan 1st 1900 to june 6th 2079&lt;br /&gt;&lt;br /&gt;DateTime&lt;br /&gt;4&lt;br /&gt;Jan 1st 1753 to Dec 31st 9999&lt;br /&gt;Miscellaneous&lt;br /&gt;SQL_variant&lt;br /&gt;Size varies&lt;br /&gt;Can Store any Type of Data&lt;br /&gt;&lt;br /&gt;Table&lt;br /&gt;Size varies&lt;br /&gt;Can Store a Table&lt;br /&gt;&lt;br /&gt;XML&lt;br /&gt;Size Varies&lt;br /&gt;Can store XML documents&lt;br /&gt;&lt;br /&gt;Constraints In SQL Server&lt;br /&gt;            A constraint is a condition given on a column that is checked during insertion and updating data of the table to maintain data integrity within the database. Constraints in SQL Server are classified into Declarative Integrity Constraints and Procedural Integrity Constraints.&lt;br /&gt;            Procedural integrity constraints are the constraints that are not possible to specify during the table creation and are specified using triggers. Declarative integrity constraints are the constraints that can be specified during the table creation. Declarative integrity constraints supported by SQL Server are as follows. Declarative integrity constraints can be specified either at column level or table level. A constraint that is specified along with the column definition is called as column level constraint and a constraint that is specified at the end of the table creation is called as table level constraint. In general table level constraints are used when you have to specify the constraint on more than one column. But you can specify a constraint that span on a single column either at column level or table level.&lt;br /&gt;&lt;br /&gt;1. Not Null : This constraint is used to restrict the user from inserting null values in to a column. It is not possible to specify the not null constraint at table level.&lt;br /&gt;&lt;br /&gt;Syntax : ColumnName DataType Not Null&lt;br /&gt;&lt;br /&gt;2. Default : This constraint is used to specify a default value for a column. When user insert a row into the table without providing a value for the column having default value then default value will be inserted in to that column. Default can be specified only at column level.&lt;br /&gt;&lt;br /&gt;Syntax : Columnname Datatype [constraint cname] default defautvalue&lt;br /&gt;&lt;br /&gt;3. Unique : This constraint is used to restrict the user from inserting duplicate values into a column. When we create a unique constraint on a column then SQL Server will automatically create an index on that column. An index can be clustered or non-clustered. By default SQL Server will create a non-clustered index on unique constraint.&lt;br /&gt;&lt;br /&gt;Syntax :&lt;br /&gt;Column Level&lt;br /&gt;ColumnName DataType [Constraint Cname] Unique [Clustered / NonClustered]&lt;br /&gt;Table Level&lt;br /&gt;            [Constraint Cname] Unique(Col1,Col2,…,Coln)&lt;br /&gt;&lt;br /&gt;4. Primary Key : A column in the table that uniquely identifies every row of the table is called as primary key. To uniquely identify every row of the table, the primary key column must not contain either null values or duplicate values. When we specify primary key constraint on a column, then user will be restricted from inserting null values as well as duplicate values. On primary key column also SQL Server will create an index, which is by default a clustered index.&lt;br /&gt;&lt;br /&gt;Syntax :&lt;br /&gt;Column Level&lt;br /&gt;ColumnName DataType [Constraint Cname] Primary Key [Clustered / NonClustered]&lt;br /&gt;Table Level&lt;br /&gt;            [Constraint Cname] Primary Key(Col1,Col2,…,Coln)&lt;br /&gt;&lt;br /&gt;5. Foreign Key :  This constraint is used to create relationship between two tables. While creating the foreign key constraint, we have to give a primary key or unique column as reference to foreign key. Now the foreign key will restrict the user from inserting a value that doesn’t exist in the referenced column.&lt;br /&gt;            While specifying the foreign key you can specify “on update” and “on delete” options that will specify the action to be taken on foreign key values when modification was done to primary key column or a primary key row was deleted. This “on update” or “on delete” option will have four options No Action, Cascade, Set Null, and Set Default.&lt;br /&gt;           &lt;br /&gt;            Default option for “on update” as well as “on delete” is no action. When these options are set to no action, it is not possible to update or delete primary key value without first updating or deleting the corresponding foreign key value.&lt;br /&gt;            When these options are set to Cascade, then any modification made to primary key value will be automatically made to foreign key value and if a primary key row was deleted then automatically all its dependent foreign key rows will be deleted.&lt;br /&gt;            When these options are set to Set Null, then any modification made to primary key value or deletion of a primary key row will automatically set all its dependent foreign key values to null.&lt;br /&gt;            When these options are set to Set Default, any modification made to primary key value or deletion of a primary key row will automatically set all its dependent foreign key values to default. If the default value is not specified for the foreign key column, then foreign key value will be set to null.&lt;br /&gt;&lt;br /&gt;Syntax :&lt;br /&gt;Column Level&lt;br /&gt;            ColumnName Datatype [Constraint Cname] References tablename(columnname)&lt;br /&gt;Table Level&lt;br /&gt;            [Constraint Cname] foreign key(Col1,Col2,…,Coln) References Tablename(Col1,Col2,…Coln)&lt;br /&gt;&lt;br /&gt;6. Check : This constraint is used to specify a custom condition on a column. When a check constraint is specified at column level, it is not possible to refer to other columns of the table within the condition of the check constraint. When you have to refer to other columns of the table within the condition of the check constraint, then you have to specify the check constraint at table level.&lt;br /&gt;&lt;br /&gt;Syntax :&lt;br /&gt;Column Level&lt;br /&gt;            ColumnName Datatype [Constraint Cname] check(condition)&lt;br /&gt;Table Level&lt;br /&gt;            [Constraint Cname] check(Condition)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Creating A Table&lt;br /&gt;            A table can be created using the create table command that has the following syntax.&lt;br /&gt;&lt;br /&gt;Create table TableName&lt;br /&gt;(Column1 Datatype [Constraints Information],&lt;br /&gt;Column2 Datatype  [Constraints Information],&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;Columnn Datatype [Constraints Information],&lt;br /&gt;[table level constraints]&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;            The following example will create a table with the name student with SID, SNAME and COURSE columns.&lt;br /&gt;&lt;br /&gt;Create table Student&lt;br /&gt;(SID Smallint constraint SID_PK primary key,&lt;br /&gt;SNAME varchar(20) not null,&lt;br /&gt;COURSE varchar(25) not null&lt;br /&gt;)&lt;br /&gt;            The same table can be created by specifying the primary key at table level as follows.&lt;br /&gt;&lt;br /&gt;Create table Student&lt;br /&gt;(SID Smallint,&lt;br /&gt;SNAME varchar(20) not null,&lt;br /&gt;COURSE varchar(25) not null,&lt;br /&gt;Constraint SID_PK primary key(SID)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;            The following example will create a table called MARKS with a foreign key that refers to STUDENT table.&lt;br /&gt;&lt;br /&gt;Create table MARKS&lt;br /&gt;(SID Smallint Constraint SID_FK references STUDENT(SID),&lt;br /&gt;C Tinyint Constraint C_CHK Check(C&lt;=100) default 0,&lt;br /&gt;CPP Tinyint Constraint CPP_CHK Check(CPP&lt;=100) default 0,&lt;br /&gt;SQL Tinyint Constraint SQL_CHK Check(SQL&lt;=100) default 0,&lt;br /&gt;TOTAL Smallint,&lt;br /&gt;AVEG Decimal(5,2),&lt;br /&gt;GRADE varchar(30)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;            The same table can be created by specifying constraints at table level as follows.&lt;br /&gt;&lt;br /&gt;Create table MARKS&lt;br /&gt;(SID Smallint,&lt;br /&gt;C Tinyint default 0,&lt;br /&gt;CPP Tinyint default 0,&lt;br /&gt;SQL Tinyint default 0,&lt;br /&gt;TOTAL Smallint,&lt;br /&gt;AVEG Decimal(5,2),&lt;br /&gt;GRADE varchar(30),&lt;br /&gt;Constraint SID_FK Foreign Key(SID) references STUDENT(SID),&lt;br /&gt;Constraint C_CHK Check(C&lt;=100),&lt;br /&gt;Constraint CPP_CHK Check(CPP&lt;=100),&lt;br /&gt;Constraint SQL_CHK Check(SQL&lt;=100)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;Note :&lt;br /&gt;1. To get the list of tables available in the current database you are using, use the following select statement.&lt;br /&gt;            Select * from Sysobjects where type=’u’&lt;br /&gt;Here ‘u’ represents the user defined tables. SQL Server also contains system tables. To get the list of system tables, specify ‘s’       &lt;br /&gt;&lt;br /&gt;2.  It is optional to give a name to a constraint when you create it. When didn’t specify a name for the constraint then SQL Server will automatically give a name to the constraint. You can get the details of all constraints available on a table by using the system procedure sp_helpconstraint.&lt;br /&gt;            Sp_HelpConstraint ‘TableName’&lt;br /&gt;&lt;br /&gt;Data Manipulation Language (DML)&lt;br /&gt;            The commands of SQL that are used to insert data into the database, modify the contents of the database and to delete the data from the database are collectively called as DML. SQL Server provides Insert command for inserting data into the database, Update command to make modifications to the data and Delete command to delete data from the database.&lt;br /&gt;Inserting Data Into A Table&lt;br /&gt;            To insert data into a table SQL Server provides insert command and it has the following syntaxes.&lt;br /&gt;&lt;br /&gt;1. Insert into tablename values(val1,val2,val3,…,valn)&lt;br /&gt;                        When you are using this syntax, you must specify a value for every column of the table. Even for a column which allows null values you must specify the value as null to insert null value into that column. If you want to insert the default value for a column then use the keyword default.&lt;br /&gt;           &lt;br /&gt;Ex 1 : To insert a row into student table, the insert statement will be written as follows.&lt;br /&gt;Insert into student values(1001,’SAI’,’SQL’)&lt;br /&gt;Ex 2 : To insert a row into Marks table, the insert statement will be written as follows. In this example I don’t want to give values for total, average and grade columns. Hence I will specify null as the value for these columns.&lt;br /&gt;            Insert into Marks Values(1001,55,77,66,null,null,null)&lt;br /&gt;&lt;br /&gt;2. Insert into tablename(Col1,Col2,Col3,…,Coln) values(Val1,Val2,Val3,…,Valn)&lt;br /&gt;            By using this syntax you can insert a row into a table without giving values for specified columns. But the columns you exclude must not contain not null constraint. Within the column list after the table name specify the names of columns for which you are providing values and then give values for those columns within the values list.&lt;br /&gt;&lt;br /&gt;Ex 1: to insert a row into marks table without giving values for total, average, and grade columns, the insert statement will be written as follows.&lt;br /&gt;            Insert into Marks(Sid,c,cpp,sql) values(1001,55,66,77)&lt;br /&gt;&lt;br /&gt;3. Insert into tablename select statement&lt;br /&gt;            This syntax is used when we have to insert rows from an existing table in to a new table, provided no. of columns and their data types match in those two tables.&lt;br /&gt;&lt;br /&gt;Updating Data In The Table&lt;br /&gt;&lt;br /&gt;            When you want to make modifications to the data available in the table, you have to use update command. Update command has the following syntax.&lt;br /&gt;&lt;br /&gt;Update tablename set column1=val1,column2=val2,….,column=valn [where condition]&lt;br /&gt;           &lt;br /&gt;            Specifying where clause is optional and when you didn’t specify the where clause then the modification will be made to every row in the table.&lt;br /&gt;&lt;br /&gt;Ex 1: To update the course of a student with sid 1002 to SQL, the update command will be as follows.&lt;br /&gt;            Update Student set course=’SQL’ where sid=1002&lt;br /&gt;&lt;br /&gt;Ex 2: To update rows in marks table by calculating total, average columns, the update statement will be as follows.&lt;br /&gt;            Update Marks Set Total = C+Cpp+Sql, Average = (C+Cpp+Sql)/3&lt;br /&gt;&lt;br /&gt;Ex 3: To update marks table by calculating grade, the update statement will be as follows. SQL server provides case statement to check for a condition and then execute the statements within update command and this update statement will use case to update grade based on average marks of the student.&lt;br /&gt;            Update Marks set Grade = case&lt;br /&gt;                                                            When Average&gt;=90 then ‘DISTINCTION’&lt;br /&gt;                                                            When Average&gt;=70 then ‘FIRST CLASS’&lt;br /&gt;                                                            When Average&gt;=55 then ‘SECOND CLASS’&lt;br /&gt;                                                            When Average&gt;=35 then ‘THIRD CLASS’&lt;br /&gt;                                                            Else ‘FAIL’&lt;br /&gt;                                                       End&lt;br /&gt;Note : SQL Server supports calculated columns. Calculated columns are the columns for which values are calculated automatically based on expressions given for those columns during the table creation. For example to create marks table with total and average as calculated columns, the create table statement will be as follows.&lt;br /&gt;            Create table Marks&lt;br /&gt;            (SID smallint constraint SID_Fk references Student(SID),&lt;br /&gt;            C Tinyint,&lt;br /&gt;            Cpp Tinyint,&lt;br /&gt;            SQL Tinyint,&lt;br /&gt;            Total as C+Cpp+SQL,&lt;br /&gt;            Average as (C+Cpp+SQL)/3,&lt;br /&gt;Grade varchar(30)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;Deleting Data From The Table&lt;br /&gt;            When you want to delete a row or rows from the table then you can use delete command. Delete command has the following syntax.&lt;br /&gt;&lt;br /&gt;            Delete [From] tableName [where Condition]&lt;br /&gt;&lt;br /&gt;            Here also specifying where clause is optional and when you didn’t specify the where clause, every row in the table will be deleted.&lt;br /&gt;&lt;br /&gt;Ex 1: To delete a row from student table, whose SID is 1002, the delete statement will be as follows.&lt;br /&gt;            Delete Student Where SID=1002&lt;br /&gt;Ex 2: To delete all rows from marks table, the delete statement will be as follows.&lt;br /&gt;            Delete Marks&lt;br /&gt;&lt;br /&gt;Truncate Command&lt;br /&gt;            For deleting rows from a table you can also use truncate command. Differences between delete and truncate commands are as follows.&lt;br /&gt;&lt;br /&gt;Delete&lt;br /&gt;Truncate&lt;br /&gt;You can delete only specified rows using where clause&lt;br /&gt;It is not possible to delete specified rows from the table as this command doesn’t support where clause and this command is used only when you want to delete all rows from a table.&lt;br /&gt;Deletes rows one by one&lt;br /&gt;Deletes rows page by page. Hence deletion will be fast.&lt;br /&gt;Deleted rows can be rollback.&lt;br /&gt;Deleted rows can’t be rollback.&lt;br /&gt;&lt;br /&gt;Syntax : Trucate table TableName&lt;br /&gt;&lt;br /&gt;Retreiving Data&lt;br /&gt;            A statement that requests data from the database is called as a query. In SQL select statement is used to retrieve data from the database and hence the select statement is called as a query. Select statement has the following syntaxes.&lt;br /&gt;1. Select * From TableName&lt;br /&gt;            This syntax is used to retrieve every row from the table with information from every column of the table. Here * represents “all columns”.&lt;br /&gt;Examples:&lt;br /&gt;i. Display The Details of all employees in the company&lt;br /&gt;                        Select * From emp&lt;br /&gt;ii. Display the details of all students&lt;br /&gt;                        Select * from Student&lt;br /&gt;2. Select Column1,column2,column3,… From TableName&lt;br /&gt;            This syntax is used to retrieve the information from only specified columns of the table from every row of the table.&lt;br /&gt;Examples:&lt;br /&gt;            i. Display Employee no,name,job and salary for every empoloyee&lt;br /&gt;                        select empno,ename,job,sal from emp&lt;br /&gt;            ii. Display sid and sname from student&lt;br /&gt;                        select sid,sname from student&lt;br /&gt;3. Select */ColumnList From TableName Where Condition&lt;br /&gt;            This syntax is used retrieve only specified rows from table. The given condition will be verified with every row and only the rows that satisfy the given condition will be displayed in the output.&lt;br /&gt;Examples:&lt;br /&gt;            i. Display the details of employees working in department 30&lt;br /&gt;                        Select * from emp where deptno=30&lt;br /&gt;            ii. Display the details of employees working as manager&lt;br /&gt;                        Select * from emp where job=’manager’&lt;br /&gt;            iii. Find employees whose salary is more than 2000 and less than 3000&lt;br /&gt;                        Select * from emp where Sal&gt;2000 and sal&lt;3000&lt;br /&gt;4. Select distinct ColumnList From TableName [Where Condition]&lt;br /&gt;            Distinct is used to eliminate duplicate values in the output of a select statement. Distinct can be used only once in a select statement and it must be immediately after select key word. When you specify a single column in the selection list after distinct then duplicates will be eliminated in that column. When you specify multiple columns in the selection list after distinct then duplicates will be eliminated in the combination of values of specified columns.&lt;br /&gt;Examples :&lt;br /&gt;            i. Find Department nos in which employees are working&lt;br /&gt;                        Select Deptno from Emp&lt;br /&gt;            This query will display Department nos 10,20 and 30 with duplicates. To display the result without duplicates we have to write the query as&lt;br /&gt;                        Select Distinct Deptno from emp&lt;br /&gt;5. Select [Distinct] */ColumnList From TableName [Where Condition] Order By ColumnName Asc/Desc&lt;br /&gt;            Order By clause is used in select statement to arrange the rows in the out put in either ascending or descending order of specified columns In the order by clause. In order by clause you can specify more than one column and when you specify more than one column, first the rows are arranged in specified order of first column in order by clause and then if more than one row has same value in that column then those rows will be arranged in specified order of second column in order by clause and so on.&lt;br /&gt;Examples:&lt;br /&gt;            i. Display all employees in the order of highest salary to lowest salary&lt;br /&gt;                        Select * from emp order by sal desc&lt;br /&gt;            ii. Display all employees in alphabetical order of their name&lt;br /&gt;                        Select * from emp order by ename&lt;br /&gt;6. Select ColumnName AliasName, ColumnName AliasName,… From TableName&lt;br /&gt;            Within the select statement you can give alias names for the columns so that column names will be changed in the output of the select statement. When alias name is more than one word then it is compulsory to include it in double quotes. Generally alias names are used for the expressions like “sal *12”&lt;br /&gt;Examples:&lt;br /&gt;            i. Display empno,name,job,salary and annual salary for every employee&lt;br /&gt;                        Select empno,ename,job,sal,sal*12 as annualsal from emp&lt;br /&gt;&lt;br /&gt;Predicates&lt;br /&gt;            SQL supports various key words and operators that can be used in where clause of select statement and these key words and operators are called as predicates. Among the predicates supported by SQL, Four predicates are as follows.&lt;br /&gt;Between … And : This predicate is used to verify whether the given value exists in given range of values. This predicate can be used with numeric type of data as well as date type of data.&lt;br /&gt;Examples:&lt;br /&gt;            i. Find all employees whose salary is more than 2000 and less than 3000&lt;br /&gt;                        Select * from emp where sal between 2000 and 3000&lt;br /&gt;            ii. Find all employees who are joined in the company in the year 1982&lt;br /&gt;                        Select * from emp where sal between ‘1/1/1982’ and ‘12/31/1982’&lt;br /&gt;In : This predicate is used to verify whether the given value exists in a given list of values. This can be used with numeric, character and date type of data.&lt;br /&gt;Examples:&lt;br /&gt;            i. Find all employees whose salary is either 800 or 1250 or 1600&lt;br /&gt;                        Select * from emp where sal in(800,1250,1600)&lt;br /&gt;            ii. Find all employees who are working as either manager or clerk or analyst&lt;br /&gt;                        Select * from emp where job in (‘manager’,’clerk’,’analyst’)&lt;br /&gt;Like : this predicate is used to verify for a specific pattern in character columns. This is used only with character type of data. With the like predicate you have to use two wild characters % and _ (Underscore).&lt;br /&gt;Examples:&lt;br /&gt;            i. Find all employees whose name starts with ‘S’&lt;br /&gt;                        Select * From emp Where Ename like ‘S%’&lt;br /&gt;            ii. Find all employees whose name ends with ‘E’&lt;br /&gt;                        Select * from emp where ename like ‘%E’&lt;br /&gt;Is Null : This predicate is used to verify for a null value in a given column.&lt;br /&gt;Examples:&lt;br /&gt;            i. Find all employees who are not drawing commission&lt;br /&gt;                        Select * from emp where comm. Is null&lt;br /&gt;&lt;br /&gt;Built In Functions&lt;br /&gt;            As in other languages like C and C++, SQL also provides Built in functions. Built in functions in SQL are classified into following categories.&lt;br /&gt;1.      Scalar Functions&lt;br /&gt;2.      Aggregate Functions&lt;br /&gt;3.      Ranking Functions&lt;br /&gt;&lt;br /&gt;Scalar Functions : The built in functions in SQL Server that work on a single value are called as scalar functions. Scalar functions are again classified into following categories based on data type on which they work.&lt;br /&gt;a)      Numeric Functions&lt;br /&gt;b)      String Functions&lt;br /&gt;c)      Date Functions&lt;br /&gt;d)      Conversion Functions&lt;br /&gt;e)      System Functions&lt;br /&gt;&lt;br /&gt;Numeric Functions : The scalar functions of SQL that work on numeric type of data are called as numeric functions. Numeric functions in SQL are as follows.&lt;br /&gt;&lt;br /&gt;Abs(n) : Returns absolute value of the given n i.e. n value without any sign.&lt;br /&gt;Cos(n) : Returns cosine value of given n in radians.&lt;br /&gt;Ceiling(n) : Returns smallest integer greater than or equal to n.&lt;br /&gt;Floor(n) : Returns Largest integer less than or equal to n.&lt;br /&gt;Radians(n) : Converts the given n in degrees to radians.&lt;br /&gt;Degrees(n) : Converts the given n in radians to degrees.&lt;br /&gt;Exp(n) : Returns e raised to the power of n. e is exponential whose value is constant and is 2.713&lt;br /&gt;Log(n) : Returns natural logarithm of n. i.e. base e logarithm.&lt;br /&gt;Log10(n) : Returns base 10 logarithm of n.&lt;br /&gt; Power(m,n) : Returns m raised to the power of n.&lt;br /&gt;Square(n) : Returns Square of given n.&lt;br /&gt;Sqrt(n) : Returns Square Root of given n.&lt;br /&gt;Sin(n) : Returns sine value of given n in radians.&lt;br /&gt;Tan(n) : Returns tangent value of given n in radians.&lt;br /&gt;Sign(n) : Return -1 if n is negative, 1 if n is positive and 0 if n is zero.&lt;br /&gt;Pi() : Return mathematical constant pi value i.e. 3.14&lt;br /&gt;Round(n,p,t) : Rounds the given in n to p decimal places. If t is specified as 1 then it truncates n to p decimal places instead of round the value.&lt;br /&gt;&lt;br /&gt;String Functions : The built-in functions of SQL that work on string type of data are called as string functions. String functions in SQL are as follows.&lt;br /&gt;ASCII(char) : Converts the specified character to the equivalent ascii code.&lt;br /&gt;Char(int) : Converts ascii code to the equivalent character.&lt;br /&gt;CharIndex(s1,s2) : returns the starting position where the partial string s1 first occurs in the string s2. Returns zero if s1 does not occur in s2.&lt;br /&gt;Lower(S1) : Converts all uppercase letters of the string s1 to lower case letters.&lt;br /&gt;Upper(s1) : Converts all lowercase letters of the string s1 to upper case letters.&lt;br /&gt;Ltrim(s1) : removes leading blank spaces in the string s1.&lt;br /&gt;Rtrim(S1) : Removes trailing blank spaces in the string s1.&lt;br /&gt;Reverse(S1) : Reverses the string S1.&lt;br /&gt;Right(S1,Len) : returns last Len characters from the string S1.&lt;br /&gt;Left(S1,Len) : returns first len characters from the string S1.&lt;br /&gt;Soundex(a) : Returns how the given string is pronounced in a four character soundex code.&lt;br /&gt;Stuff(s1,a,len,s2) : Replaces the partial string s1 with the partial string s2 starting at position a, replacing len characters of s1.&lt;br /&gt;Substring(S1,a,len) : creates a partial string from string s1 starting at the position a with a length of len.&lt;br /&gt;&lt;br /&gt;Date Functions : The built-in functions of SQL that work on date type of data are called as date functions and date functions in SQL server are as follows.&lt;br /&gt;GetDate() : Returns the current system date and time.&lt;br /&gt;DatePart(item,D) : returns the specified part item of a date D as an integer.&lt;br /&gt;DateName(item,D) : returns the specified part item of the date D as a string.&lt;br /&gt;DateDiff(item,D1,D2) : calculates the difference between the two date parts D1 and D2 and returns the result as an integer in units specified by the value item.&lt;br /&gt;DateAdd(item,n,D) : Adds the number n of units specified by the value item to the given date D.&lt;br /&gt;&lt;br /&gt;Conversion Functions :  The Built-In functions of SQL Server that are used to convert one type of data to another are called as conversion functions and conversion functions in SQL Server are as follows.&lt;br /&gt;Cast(a as type[(length)]) : converts an expression a into the specified data type type.&lt;br /&gt;Convert(type[(length}],a) : Equivalent to cast, but the arguments are specified differently.&lt;br /&gt;&lt;br /&gt;System Functions : The SQL Server system functions provide extensive information about database objects.&lt;br /&gt;Object_ID(objname) : returns the identifier of the database object objname.&lt;br /&gt;Object_name(obj_id) : returns the name of the database object with id obj_id.&lt;br /&gt;Col_Name(Obj_Id,S_Id) : returns the name of the column belonging to the object obj_id with the identifier s_id.&lt;br /&gt;Col_Length(obj,Col) : returns the length of the column belonging to a database object obj.&lt;br /&gt;Datalength(s1) : calculates the length of the result of the expression s1.&lt;br /&gt;DB_Id(Db_name) : returns the id of the database db_name.&lt;br /&gt;DB_Name(Db_id) : returns the name of the database with id Db_id.&lt;br /&gt;User_Id(username) : returns the id of specified user name.&lt;br /&gt;user_name(uid) : returns the name of the user with id uid.&lt;br /&gt;Current_TimeStamp : returns the current date and time.&lt;br /&gt;&lt;br /&gt;Aggregate Functions : The Built-In Functions of SQL Server that operate on a set of values are called as aggregate functions. Aggregate functions are again classified into following categories.&lt;br /&gt;Convenient Aggregate Functions&lt;br /&gt;Statistical Aggregate Functions&lt;br /&gt;Super Aggregates&lt;br /&gt;&lt;br /&gt;1. Convenient Aggregate Functions :&lt;br /&gt;&lt;br /&gt;o        Sum(Col) : Returns the sum of all values in the specified column.&lt;br /&gt;o        Avg(Col) : Returns average of all values in the given column.&lt;br /&gt;o        Max(Col) : Returns the highest value among all values in the given column.&lt;br /&gt;o        Min(Col) : Returns the smallest value among all values in the given column.&lt;br /&gt;o        Count(*)/Count_Big(*) : Returns the total no. of rows in the given table.&lt;br /&gt;o        Count(Col)/Count_Big(Col) : Returns the no. of non-null values in the given column.&lt;br /&gt;&lt;br /&gt;2. Statistical Aggregate Functions :&lt;br /&gt;&lt;br /&gt;o        Var(Col) : Returns Variance of all values in the given column.&lt;br /&gt;o        Varp(Col) : Returns Variance of population of all values in the given column.&lt;br /&gt;o        Stdev(Col) : Returns standard deviation of all values in the given column.&lt;br /&gt;o        Stdevp(Col) : Returns Standard Deviation of population of all values in the given column.&lt;br /&gt;&lt;br /&gt;Group By : Group By is used to group the rows of table based on values of a given column and applies the aggregate function on each group separately.&lt;br /&gt;Examples:&lt;br /&gt;i. calculate sum of salaries of employees department wise&lt;br /&gt;Select Deptno,Sum(Sal) from emp group by Deptno&lt;br /&gt;In the above query group by will divide the table in to groups based on deptno and then calculates sum(sal) for each group separately, which will give the sum of salaries of employees department wise.&lt;br /&gt;            ii. Calculate sum of salaries of employees job wise&lt;br /&gt;                        Select Job,Sum(sal) from emp group by job&lt;br /&gt;Rule : A rule to be followed when working with group by is the columns that are selected in the select list except aggregate functions must be in group by.&lt;br /&gt;&lt;br /&gt;Having : Having is used to check for a condition that contains an aggregate function instead of where clause. Because where clause can check a condition without any aggregate function but not a condition with aggregate function. For example if you want to find the departments with three or more employees then the query will be as follows.&lt;br /&gt;&lt;br /&gt;Select Deptno,Count(*) From Emp group by Deptno having Count(*)&gt;=3&lt;br /&gt;In the above query condition is Count(*)&gt;=3. This contains an aggregate function. Hence we must use having instead of where clause.&lt;br /&gt;Rule : A Rule to follow when using having clause is a corresponding group by is must for a having clause.&lt;br /&gt;&lt;br /&gt;Super Aggregates : SQL Server provides Two super aggregates Cube and Rollup.&lt;br /&gt;&lt;br /&gt;Roll Up : Roll up is used to calculate sub totals at the end of each group based on values of first column in group by when you group the data on more than one column.&lt;br /&gt;Cube : Cube is used to calculate sub totals at the end of each group based on values of second column in group by along with the result of rollup when data is grouped on more than one column in group by.&lt;br /&gt;&lt;br /&gt;            Roll up and Cube can be used only with group by. For example if you want to calculate sub totals at the end of each department when grouping data on both Deptno and Job, then the following query is used.&lt;br /&gt;&lt;br /&gt;Select Deptno, Job, Sum(Sal) from emp group by Deptno,Job with roll up / with cube&lt;br /&gt;&lt;br /&gt;COMPUTE Clause : The compute clause uses aggregate functions to calculate summary values that appear as additional rows in the result of a query. The aggregate functions used with the compute clause are referred to as row aggregate functions.&lt;br /&gt;                                    The compute clause has an optional BY portion. BY defines the grouping form of the result. If BY is omitted, the row aggregate function is applied to all rows of a result query. The ORDER BY clause is required if the COMPUTE clause with BY is used.&lt;br /&gt;Example :&lt;br /&gt;            Display Employee Details Along with Total salary department wise&lt;br /&gt;                        Select * from Emp order by Deptno Compute Sum(sal) by Deptno&lt;br /&gt;&lt;br /&gt;OVER Clause : OVER Clause can be used to group the data like GROUP BY. The main difference between the use of the GROUP BY clause and grouping using the OVER clause is that the OVER clause displays each of the rows from a group separately, while the GROUP BY clause displays only one row for each group.&lt;br /&gt;Example :&lt;br /&gt;            Display Employee Details Along with Total salary department wise&lt;br /&gt;                        Select *,Sum(Sal) over(order by deptno) from emp&lt;br /&gt;&lt;br /&gt;RANKING FUNCTIONS&lt;br /&gt;            SQL Server 2005 defines several functions that are categorized as ranking functions, i.e., functions that return a ranking value for each row in a partition group. The system supports following ranking functions.&lt;br /&gt;1. RANK() : This function is used to return a number that specifies the rank of the row among all rows. The RANK function uses logical aggregation. In other words, if two or more rows in a result set have same value in the ordering column, they will have the same rank.&lt;br /&gt;Example :&lt;br /&gt;            Display employee details along with a rank based on salary&lt;br /&gt;                        Select empno,ename,job,sal,rank() over(order by sal desc) as Rank from emp&lt;br /&gt;&lt;br /&gt;2.  DENSE_RANK() : This function works same as Rank(), except that it will not skip a rank when two or more rows got the same rank.&lt;br /&gt;Example :&lt;br /&gt;            Display employee details along with a rank based on salary&lt;br /&gt;            Select empno,ename,job,sal,Dense_rank() over(order by sal desc) as Rank from emp&lt;br /&gt;&lt;br /&gt;2. ROW_NUMBER() : It returns the sequential number of a row within a result set, starting at 1 for the first row.&lt;br /&gt;&lt;br /&gt;PARTITION BY : Ranking functions can be applied to partitions by using partition by clause within the OVER() clause along with ORDER BY.&lt;br /&gt;Example :&lt;br /&gt;            Display Employee details along with a rank department wise&lt;br /&gt;            Select empno,ename,job,sal,Dense_rank() over(partition by sal ) as Rank from emp&lt;br /&gt;&lt;br /&gt;TOP n Clause : This clause specifies the first n rows of the query result that are to be retrieved. The TOP n clause can also be used with the additional PERCENT option. In that case, the first n percent of the rows are retrieved from the result set. The additional option WITH TIES specifies that additional rows will be retrieved from the query result if they have the same value in the ORDER BY column as the last row that belongs to the displayed set.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;            i. Find Top3 salaried employees&lt;br /&gt;                        Select Top 3 empno,ename,job,sal from emp order by sal desc&lt;br /&gt;            ii. find Top 10% salaried employees&lt;br /&gt;                        Select Top 10 Percent Empno,ename,job,Sal from emp order by sal desc&lt;br /&gt;&lt;br /&gt;SET OPERATORS&lt;br /&gt;                        SQL Server supports the following three set operators that connect two or more queries.&lt;br /&gt;1.      UNION&lt;br /&gt;2.      INTERSECT&lt;br /&gt;3.      EXCEPT&lt;br /&gt;&lt;br /&gt;UNION : The result of the UNION of the two sets is the set of all elements appearing in either or both of the sets by eliminating duplicate values. If UNION ALL is used, all resulting rows, including duplicates, are to be displayed.&lt;br /&gt;Example :&lt;br /&gt;            Find jobs available in departmenents 10,20&lt;br /&gt;                        Select Job From Emp Where Deptno=10&lt;br /&gt;                        Union&lt;br /&gt;                        Select Job From Emp Where Deptno=20&lt;br /&gt;&lt;br /&gt;INTERSECT : The intersection of two tables is the set of rows belonging to both tables.&lt;br /&gt;Example :&lt;br /&gt;            Find jobs available Both in departmenents 10 and 20&lt;br /&gt;                        Select Job From Emp Where Deptno=10&lt;br /&gt;                        Intersect&lt;br /&gt;                        Select Job From Emp Where Deptno=20&lt;br /&gt;&lt;br /&gt;EXCEPT : This finds the difference of two tables. The difference of two tables is the set of all rows, where the resulting rows belong to the first table but not to the second one.&lt;br /&gt;Example :&lt;br /&gt;            Find jobs available in departmenent 10 And not in 20&lt;br /&gt;                        Select Job From Emp Where Deptno=10&lt;br /&gt;                        Except&lt;br /&gt;                        Select Job From Emp Where Deptno=20&lt;br /&gt;&lt;br /&gt;JOINING&lt;br /&gt;            The process of combining data from more than one table using a single select statement is called as joining. Within a relational database data will not be stored in a single table. Hence join is needed whenever we have to combine data from more than one table. Joining in SQL Server is classified as follows.&lt;br /&gt;&lt;br /&gt;EQUI JOIN : Joining more than one table by using a join condition that uses = operator is called as equi join.&lt;br /&gt;Example :&lt;br /&gt;Display Employee Details along with department details in which employee is working.&lt;br /&gt;            Select * From Emp E join Dept D on E.Deptno=D.Deptno&lt;br /&gt;&lt;br /&gt;NATURAL JOIN : The equi join that displays the common column of the two tables only once is called as natural join.&lt;br /&gt;Example :&lt;br /&gt;Display Employee Details along with department details in which employee is working.&lt;br /&gt;            Select E.*,Dname,Loc From Emp E join Dept D on E.Deptno=D.Deptno&lt;br /&gt;&lt;br /&gt;OUTER JOIN : The join statement that displays the data that doesn’t satisfy the given join condition along with the data that satisfies the condition is called as outer join. Outer join is again three types.&lt;br /&gt;Left Outer Join : the outer join that displays rows from LHS table that does not contain a corresponding row in RHS table is called as Left Outer Join.&lt;br /&gt;Right Outer Join : the outer join that displays rows from RHS table that does not contain a corresponding row in LHS table is called as Right Outer Join.&lt;br /&gt;Full Outer Join : The outer join that displays rows from both the tables that doesn’t contain a corresponding row in the opposite table is called as full outer join.&lt;br /&gt;Example :&lt;br /&gt;Display Employee Details along with department details in which employee is working. Also display the details of departments in which there are no employees.&lt;br /&gt;            Select * From Emp E right outer join Dept D on E.Deptno=D.Deptno&lt;br /&gt;&lt;br /&gt;THETA JOIN : The join operation that uses a condition that contains an operator other than = is called as theta join.&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;Display Employee Details along with Grade of employee based on salary&lt;br /&gt;            Select *,grade From Emp join salgrade on Sal between losal and hisal&lt;br /&gt;&lt;br /&gt;CROSS JOIN : The join statement without any join condition is called as cross join. The result of this cross join is called as Cartesian product.&lt;br /&gt;Example :&lt;br /&gt;Display Employee Details by associating every employee with every department&lt;br /&gt;            Select * From Emp E Cross join Dept D&lt;br /&gt;&lt;br /&gt;SELF JOIN : The join statement that joins a table to it self is called as self join.&lt;br /&gt;Example :&lt;br /&gt;Display Employee Details along with his/Her manager name&lt;br /&gt;            Select E.Empno,E.ename,E.Job,E.Sal,E.Mgr,M.Ename&lt;br /&gt;From Emp E join Emp M on&lt;br /&gt;E.Mgr=M.Empno&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Rule : A rule to be followed when writing a join statement is no. of join conditions must be one less than no. of tables on which you perform join.&lt;br /&gt;&lt;br /&gt;SUB QUERIES&lt;br /&gt;            A statement that requests data from the database is called as a query. Select is used to request data from the database and hence select statement is called as a query. A select statement within another select statement is called as a sub query. Sub queries are classified as follows.&lt;br /&gt;Single Row Sub Queries&lt;br /&gt;Multi Row Sub Queries&lt;br /&gt;Nested Sub Queries&lt;br /&gt;Co-related sub queries&lt;br /&gt;&lt;br /&gt;SINGLE ROW SUB QUERIES : The sub query that returns only one row is called as single row sub query.&lt;br /&gt;Example :&lt;br /&gt;            i. Find The Employees Working In Sales Department.&lt;br /&gt;                        Select * From Emp where Deptno=&lt;br /&gt;(Select Deptno From Dept Where Dname=’Sales’)&lt;br /&gt;                        ii. Find The Employee Who is drawing highest salary.&lt;br /&gt;                                    Select * from emp where sal=&lt;br /&gt;                                                (Select max(sal) from emp)&lt;br /&gt;&lt;br /&gt;MULTI ROW SUB QUERIES : The Sub query that returns more than one row is called as multi row sub query. When a sub query returns more than one row then it is not possible use the operators like =,&lt;,&gt;,&lt;=, and &gt;=. To make this possible SQL Server provides two operators, Any and All. “Any” operators returns true only when the given condition is true with at least one value returned by the sub query and “All” operator will return true only when the condition is true with every value returned by the sub query.&lt;br /&gt;Example :&lt;br /&gt;            i. Find highest salaried employees department wise&lt;br /&gt;                        Select * from emp where sal in&lt;br /&gt;                                    (Select max(sal) from emp group by deptno)&lt;br /&gt;            ii. Find Employees not working in dept 30 and drawing salary more than any&lt;br /&gt;one employee in dept 30.&lt;br /&gt;                        Select * from Emp where Deptno!=30 and sal&gt; Any&lt;br /&gt;                                    (Select Distinct sal from emp where deptno=30)&lt;br /&gt;            iii. Find Employees not working in dept 30 and drawing salary more than all&lt;br /&gt;employees in dept 30.&lt;br /&gt;                        Select * from Emp where Deptno!=30 and sal&gt; All&lt;br /&gt;                                    (Select Distinct sal from emp where deptno=30)&lt;br /&gt;&lt;br /&gt;NESTED SUB QUERIES : The sub query that contains another sub query within it is called as nested sub query.&lt;br /&gt;Example :&lt;br /&gt;            Find Employees whose salary is more than average salary of sales Dept.&lt;br /&gt;                        Select * from emp where sal &gt;&lt;br /&gt;                                    (Select Avg(sal) from emp where deptno=&lt;br /&gt;                                                (Select Deptno from Dept where Dname=’Sales’))&lt;br /&gt;&lt;br /&gt;CO-RELATED SUB QUERIES : The sub query that refers a column of the outer query within its condition is called as co-related sub query. SQL Server provides two operators that can be used only with co-related sub queries, Exists and NotExists. “Exists” returns true only when the co-related sub query returns at least one row and “NotExists” will return true only when the co-related sub query doesn’t return any rows.&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;i. Find Employees whose salary is more than average salary of the dept in which he is working.&lt;br /&gt;                        Select * from Emp E where Sal &gt;&lt;br /&gt;                                    (Select Avg(sal) from Emp S where E.Deptno=S.Deptno)&lt;br /&gt;            ii. Find Employees To Whom At least one employee is Reporting.&lt;br /&gt;                        Select * From emp M where exists&lt;br /&gt;                                    (Select * From Emp e where M.Empno=E.Mgr)&lt;br /&gt;            iii. Find Departments in which there are no employees&lt;br /&gt;                        Select * From Dept D where not exists&lt;br /&gt;                                    (Select * From emp Where D.Deptno=E.Deptno)&lt;br /&gt;&lt;br /&gt;INDEXES&lt;br /&gt;            An index in SQL Server is similar to an index in a book. We can find a topic in a book very fast with the help of an index. In the same way if an index is available in SQL Server, then data retrieval will be very fast. Hence the main purpose of an index is to speed up the data retrieval. An index is maintained by SQL server in the form of a B-Tree data structure. To create an index, the following syntax is used.&lt;br /&gt;&lt;br /&gt;Create [Unique] [Clustered/NonClustered] index idxname on tablename(Col1,Col2,…)&lt;br /&gt;&lt;br /&gt;            When we use Unique keyword  during the creation of index, then along with the index unique constraint will also be created on that column.&lt;br /&gt;&lt;br /&gt;            When an index is a clustered index, then the physical order of rows in table will be in the same order of rows in index and when an index is an unclustered index, then the physical order of rows in the table will not be in the order of rows in the index.&lt;br /&gt;&lt;br /&gt;            When an index is created on a single column, then the index is called as single column index and when the index is created on more than one column, then the index is called as a multi column index or composite index.&lt;br /&gt;Example :&lt;br /&gt;            i. Create an index on deptno column of emp table.&lt;br /&gt;                        Create Index DnoIDX on Emp(Deptno Asc)&lt;br /&gt;            ii.  Create An Index On Deptno And Job Columns Of Emp Table.&lt;br /&gt;                        Create Index DnoJobIDX on Emp(Job Asc,Deptno Desc)&lt;br /&gt;&lt;br /&gt;            SQL Server will use index only in the following situations&lt;br /&gt;1.      The column on which index was created is referred in where clause.&lt;br /&gt;2.      If the index is created on more than one column, all the columns on which index was created must be referred in where clause.&lt;br /&gt;&lt;br /&gt;Altering An Index&lt;br /&gt;      After creating index you can alter the index using alter index command that has the following syntax.&lt;br /&gt;Syntax :  Alter Index IdxName on TableName Rebuild/Reorganize/Disable&lt;br /&gt;      Rebuild will rebuild the entire index.&lt;br /&gt;      Reorganize will reorganize the leaf level nodes of Index&lt;br /&gt;      Disable will disable the index and to enable the index use rebuild option.&lt;br /&gt;&lt;br /&gt;Deleting an Index&lt;br /&gt;To Delete an index use drop index command as follows.&lt;br /&gt;Drop Index IdxName&lt;br /&gt;&lt;br /&gt;VIEWS&lt;br /&gt;&lt;br /&gt;            A view is a logical object that doesn’t contain data directly. A view is not an independent object and is created from a table or another view. The main purpose of a view is as follows.&lt;br /&gt;&lt;br /&gt;1. To restrict the access to specific rows and or columns in the table.&lt;br /&gt;2. To restrict the insertion and updation to only specified range of values.&lt;br /&gt;3. To hide the complexity of a complex query like join or subquery.&lt;br /&gt;&lt;br /&gt;            Once a view is created you can use it like a table and you can perform any DML operation on that view as you perform on table. But any modification made to the view will be done in the table from which the view was created and whenever you select data from the view, the select statement written for the view will be executed and data is retrieved from the base table of the view.&lt;br /&gt;&lt;br /&gt;Creating A View :&lt;br /&gt;&lt;br /&gt;Create view viewname(Col1,Col2,…) as select statement [with check option]&lt;br /&gt;&lt;br /&gt;            Example :&lt;br /&gt;                        Create a view that will provide access to only dept 10 rows from emp table&lt;br /&gt;                                    Create View Emp10 As Select * From emp Where Deptno=10&lt;br /&gt;&lt;br /&gt;            If we create a view without with check option clause, then insertion and updation can be done for the rows that doesn’t satisfy the condition specified in where clause of select statement of the view and if a view is created with with check option clause then insertion and updation of rows in the view is not possible if the row fails to satisfy the condition specified in where clause of the select statement of the view.&lt;br /&gt;&lt;br /&gt;Complex View&lt;br /&gt;&lt;br /&gt;            A view is called as a complex view if it satisfies any of the following conditions.&lt;br /&gt;1.      If the view is created from a select statement that combines the data from more than one table.&lt;br /&gt;2.      If the select statement of the view contains distinct or group by.&lt;br /&gt;3.      If the select statement of the view contains an expression like Sal*12 as a column.&lt;br /&gt;4.      if the Select statement contains Aggregate functions.&lt;br /&gt;&lt;br /&gt;Performing DML operations is not possible on complex view. But user can select data from the complex view.&lt;br /&gt;Example :&lt;br /&gt;      Create a view that will contain data of employees along with department details in which employee is working.&lt;br /&gt;      Create View EmpDept as Select E.*,Dname,Loc from emp join dept&lt;br /&gt;                  Where e.deptno=d.deptno&lt;br /&gt;&lt;br /&gt;Altering a View&lt;br /&gt;            A view can be altered by using Alter view command when you want to change the definition of the view.&lt;br /&gt;Syntax : Alter View ViewName[(Col1,Col2,…)] As Select Statement [With Check Option]&lt;br /&gt;&lt;br /&gt;Deleting A View&lt;br /&gt;            Drop view viewname&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TRANSACTION PROCESSING&lt;br /&gt;&lt;br /&gt;            A series of changes made to one or more tables of the database is called as a transaction. When we make changes to the database by creating a transaction, any changes made to the database will not be made permanent to the database and user will have the choice to cancel those changes or make those changes permanent. For transaction processing SQL Server provides the following commands.&lt;br /&gt;&lt;br /&gt;1. Begin Transaction :  This command will start a transaction.&lt;br /&gt;2. Commit Transaction : This command will make changes in the current transaction permanent and ends the transaction.&lt;br /&gt;3. Rollback Transaction : This command will cancel the changes in the current transaction and ends the transaction.&lt;br /&gt;4. Save Transaction : This command will create a save point that will divide the transaction in to more than one part so that user can commit one part while rollback the other part. When user rollback the transaction to a save point, all the changes made to the database prior to the save point will be committed while all the changes after the save point are rollback.&lt;br /&gt;&lt;br /&gt;            During the transaction processing, SQL Server will use log files to record the changes and uses the information in log file to commit or rollback the changes in current transaction. If a transaction was started and there is system failure before the transaction was committed or rollback, then all the changes in the current transaction will be automatically rollback. Whenever a change was made to the database in a transaction, before image of the table and after image of the table are written to the log file. In case transaction was committed, after image will be used to make the changes in current transaction permanent to the database other wise before image will be used to cancel the changes made to the database.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PROCEDURAL STATEMENTS&lt;br /&gt;&lt;br /&gt;            SQL is a non-procedural language and hence it is very easy to work with SQL. But solving some complex queries is not possible is not possible using SQL. Hence procedural features are provided for SQL, which is called as PL/SQL.&lt;br /&gt;&lt;br /&gt;Block : A set of statements written within Begin and End statements is called as a block.&lt;br /&gt;            Begin&lt;br /&gt;                        -----&lt;br /&gt;                        -----&lt;br /&gt;                        -----&lt;br /&gt;            End&lt;br /&gt;&lt;br /&gt;Print : Print command is used to print any output to the out put window.&lt;br /&gt;            Print ‘Out put To Display To The User’&lt;br /&gt;&lt;br /&gt;Declaration : to declare variables within a block use Declare key word and a variable in SQL Server must be prefixed with @&lt;br /&gt;            Declare @Var1 Datatype, @Var2 Datatype,…&lt;br /&gt;&lt;br /&gt;Setting Value : To set value for a variable, use set statement.&lt;br /&gt;            Set @Var=Value&lt;br /&gt;&lt;br /&gt;IF&lt;br /&gt;If condition&lt;br /&gt;Begin&lt;br /&gt;                        Statements&lt;br /&gt;End&lt;br /&gt;&lt;br /&gt;            If Condition&lt;br /&gt;            Begin&lt;br /&gt;                        Statements&lt;br /&gt;            End&lt;br /&gt;            Else if Condition&lt;br /&gt;            Begin&lt;br /&gt;                        Statements&lt;br /&gt;            End&lt;br /&gt;            Else if condition&lt;br /&gt;            Begin&lt;br /&gt;                        Statements&lt;br /&gt;            End&lt;br /&gt;            Else&lt;br /&gt;            Begin&lt;br /&gt;                        Statements&lt;br /&gt;            End&lt;br /&gt;&lt;br /&gt;WHILE&lt;br /&gt;            While Condition&lt;br /&gt;            Begin&lt;br /&gt;                        Statements&lt;br /&gt;            End&lt;br /&gt;&lt;br /&gt;Examples :&lt;br /&gt;i. This examples adds two numbers and prints the sum&lt;br /&gt;            Begin&lt;br /&gt;                        Declare @A int,@B int, @S int&lt;br /&gt;                        Set @A=10&lt;br /&gt;                        Set @B=20&lt;br /&gt;                        Set @S=@A+@B&lt;br /&gt;                        Print ‘Sum is ‘ + cast(@S as varchar(5))&lt;br /&gt;            End&lt;br /&gt;ii. This example will determine whether an integer is even or odd&lt;br /&gt;            Begin&lt;br /&gt;                        Declare @N int&lt;br /&gt;                        Set @N=5&lt;br /&gt;                        If @N%2=0&lt;br /&gt;                                    Print ‘Even Number’&lt;br /&gt;                        Else&lt;br /&gt;                                    Print ‘Odd Number’&lt;br /&gt;            End&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;iii. This Example will print integers from 1 to 10&lt;br /&gt;            Begin&lt;br /&gt;                        Declare @N int&lt;br /&gt;                        Set @N=1     &lt;br /&gt;                        While @N&lt;=10&lt;br /&gt;                        Begin&lt;br /&gt;                                    Print @N&lt;br /&gt;                                    Set @N=@N+1&lt;br /&gt;                        End&lt;br /&gt;            End&lt;br /&gt;&lt;br /&gt;STORED PROCEDURES&lt;br /&gt;&lt;br /&gt;            SQL Server supports the creation of user defined functions as well as procedures, which are called as stored Subprograms. An user defined function is a stored subprogram that will return a value back to the calling location. To create a function, the following syntax is used.&lt;br /&gt;&lt;br /&gt;Create Function FunctionName(@Param1 Datatype, @Param2 Datatype, …) Returns Datatype as&lt;br /&gt;Begin&lt;br /&gt;            Statements&lt;br /&gt;            Return Value&lt;br /&gt;End&lt;br /&gt;&lt;br /&gt;            To execute an user defined function, you can use select statement as follows&lt;br /&gt;&lt;br /&gt;Select Dbo.Functionname(Arg1,Arg2,…)&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;            i. Create a Function that will calculate Sum of three integers&lt;br /&gt;                        Create Function Total(@A int,@B int, @C int) returns int as&lt;br /&gt;                        Begin&lt;br /&gt;                                    Return @A+@B+@C&lt;br /&gt;                        End&lt;br /&gt;            ii. Create A Function That Will Generate New Deptno Automatically.&lt;br /&gt;                       &lt;br /&gt;Create Function NewDno() returns int as&lt;br /&gt;                        Begin&lt;br /&gt;                                    Declare @NDno int&lt;br /&gt;                                    Set @NDno=(Select isnull(max(deptno),0)+10 from dept)&lt;br /&gt;                                    Return @NDno&lt;br /&gt;                        End&lt;br /&gt;&lt;br /&gt;            To Delete a function, use Drop Function Command as follows.&lt;br /&gt;&lt;br /&gt;Drop Function FunctionName&lt;br /&gt;&lt;br /&gt;            A procedure is a stored subprogram that will not return a value back to the calling location and syntax for creating a procedure is as follows.&lt;br /&gt;&lt;br /&gt;Create Procedure ProcedureName(@param1 Datatype, @Param2 Datatype,…) as&lt;br /&gt;Begin&lt;br /&gt;            Statements&lt;br /&gt;End&lt;br /&gt;&lt;br /&gt;            To execute a procedure, use execute command as follows.&lt;br /&gt;           &lt;br /&gt;Execute ProcName Arg1 , Arg2, Arg3, …&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;            i. Create A Procedure that will insert a row into Dept table.&lt;br /&gt;                        Create Procedure InsertDept(@Dno int,@Dn varchar(30),@L varchar(30)) as&lt;br /&gt;                        Begin&lt;br /&gt;                                    Insert into Dept values(@Dno,@Dn,@L)&lt;br /&gt;                        End&lt;br /&gt;            ii. Create A Procedure To Update A Row Of Dept Table.&lt;br /&gt;                        Create Procedure UpdateDept(@Dno int, @Dn varchar(30),@l varchar(30)) as&lt;br /&gt;                        Begin&lt;br /&gt;                                    Update Dept Set Dname=@Dn,Loc=@L where Deptno=@Dno&lt;br /&gt;                        End&lt;br /&gt;            iii. Create A Procedure To Delete A Row From Dept table.&lt;br /&gt;                        Create procedure DelDept(@Dno int) As&lt;br /&gt;                                    Delete Dept Where Deptno=@Dno              &lt;br /&gt;            To Delete a procedure, use Drop Procedure command as follows.&lt;br /&gt;&lt;br /&gt;                        Drop Procedure Procedurename&lt;br /&gt;&lt;br /&gt;Default Arguments&lt;br /&gt;            A procedure can be created with default arguments. A default argument is an argument that is initialized within the procedure creation. When an argument is created as default argument, it is optional to pass a value to that argument during function call and if you don’t pass a value then default value will be used other wise the value you pass will overwrite the default value. Advantage is a procedure can be called with variable number of arguments. Functions doesn’t support default arguments.&lt;br /&gt;Example :&lt;br /&gt;            This example will create a procedure that can be called with 2 or 3 or 4 or 5 integers to calculate Sum.&lt;br /&gt;            Create procedure MySum(@A int,@B int, @C int=0,@D int=0,@E int=0) As&lt;br /&gt;            Begin&lt;br /&gt;                        Print @A+@B+@C+@D+@E&lt;br /&gt;            End&lt;br /&gt;            Execute MySum 10,20&lt;br /&gt;            Execute MySum 10,20,30&lt;br /&gt;            Execute MySUm 10,20,30,40&lt;br /&gt;            Execute mySum 10,20,30,40,50&lt;br /&gt;&lt;br /&gt;Output Parameters&lt;br /&gt;            In SQL Server Parameters of functions and procedures are classified into input parameters and output parameters. By default every parameter is an input parameter. Any changes made to input parameters within the function or procedure will not reflect in arguments passed to them. But any changes made to output parameters will reflect in arguments.&lt;br /&gt;Example : This example will create a procedure Swap that will swap two integers.&lt;br /&gt;            Create procedure Swap(@X int output, @Y int output) As&lt;br /&gt;            Begin&lt;br /&gt;                        Declate @T int&lt;br /&gt;                        Set @T=@X&lt;br /&gt;                        Set @X=@Y&lt;br /&gt;                        Set @Y=@T&lt;br /&gt;            End&lt;br /&gt;            To execute this procedure we have to create a block as follows.&lt;br /&gt;            Begin&lt;br /&gt;                        Declare @A int,@B int&lt;br /&gt;                        Set @A=10&lt;br /&gt;                        Set @B=20&lt;br /&gt;                        Print ‘Before Swap A = ‘ + cast(@A as varchar(3)) + ‘ B = ‘ + cast(@B as varchar(3))&lt;br /&gt;                        Swap @A output,@B output&lt;br /&gt;                        Print ‘After Swap A = ‘ + cast(@A as varchar(3)) + ‘ B = ‘ + cast(@B as varchar(3))&lt;br /&gt;            End&lt;br /&gt;&lt;br /&gt;Cursors&lt;br /&gt;&lt;br /&gt;            Cursors are used within a stored procedure when you want to access the rows of a table in a sequence. Actually we can access only one row at a time within a stored procedure. But with the help of cursors we can access the rows of a table one by one sequentially. To work with cursors we have to follow the following steps.&lt;br /&gt;&lt;br /&gt;1.      Cursor Declaration : first we have to declare the cursor. During the declaration a name was given to the cursor and a select statement is associated with the cursor.&lt;br /&gt;&lt;br /&gt;Declare Cursorname Cursor for select statement&lt;br /&gt;&lt;br /&gt;2.      Opening Cursor : Before using the cursor, cursor must be opened. When we open the cursor, the select statement associated with the cursor will be executed and the returned rows will be stored in buffer and cursor will point to this buffer.&lt;br /&gt;&lt;br /&gt;Open CursorName&lt;br /&gt;&lt;br /&gt;3.      Fetching Rows : Retrieving a row in the buffer pointed by cursor into local variables is called as fetching. As it is not possible to make changes to the data within the buffer, first they must be copied to the local variables. You can verify whether fetch was success or not by using the system variable @@FETCH_STATUS. If fetch was success this variable will contain “0” other wise a negative value.&lt;br /&gt;&lt;br /&gt;Fetch Next / Prior / First / Last / Absolute n / Relative n from Cursorname To Local variables list&lt;br /&gt;&lt;br /&gt;4.      Closing Cursor : After the work with cursor was finished, cursor must be closed. When the cursor was closed, it is not possible to fetch the rows. But you can reopen the cursor to fetch rows.&lt;br /&gt;&lt;br /&gt;Close CursorName&lt;br /&gt;&lt;br /&gt;5.      Deallocating Cursor : Finally you can deallocate cursor so that memory resources associated with the cursor will be released.&lt;br /&gt;Deallocate Cursorname&lt;br /&gt;&lt;br /&gt;Example : This example will Read one by one record from Emp table and increments salary based on job&lt;br /&gt;            Create procedure Increment as&lt;br /&gt;            Begin&lt;br /&gt;                        Declare @Eno int,@J varchar(30),@S decimal(7,2)&lt;br /&gt;                        Declare MyCur Cursor for select empno,job,sal from emp&lt;br /&gt;                        Open MyCur&lt;br /&gt;                        Fetch next from mycur into @Eno,@J,@S&lt;br /&gt;                        While @@Fetch_Status=0&lt;br /&gt;                        Begin&lt;br /&gt;                                    If @J=’President’&lt;br /&gt;                                                Set @S=@S+5000&lt;br /&gt;                                    Else if @J=’Manager’&lt;br /&gt;                                                Set @S=@S+3000&lt;br /&gt;                                    Else if @J=’Analyst’&lt;br /&gt;                                                Set @S=@S+2000&lt;br /&gt;                                    Else if @J=’Salesman’&lt;br /&gt;                                                Set @S=@S+1500&lt;br /&gt;                                    Else&lt;br /&gt;                                                Set @S=@S+700&lt;br /&gt;                                    Update Emp set Sal=@S where Empno=@Eno&lt;br /&gt;                                    Fetch Next From MyCUr into @Eno,@J,@S&lt;br /&gt;                        End&lt;br /&gt;                        Close Mycur&lt;br /&gt;                        Deallocate Mycur&lt;br /&gt;            End&lt;br /&gt;&lt;br /&gt;TRIGGERS&lt;br /&gt;&lt;br /&gt;            A trigger is like a stored procedure stored within the database. But unlike stored procedure, the trigger will be executed automatically based on the DML event specified for the trigger during trigger creation.&lt;br /&gt;            While working with the triggers SQL server will automatically create two virtual tables inserted and deleted. Inserted table will contain new values of the row and deleted table will contain old values of the row.&lt;br /&gt;&lt;br /&gt;            Constraints within SQL Server are classified into declarative integrity constraints and procedural integrity constraints. Declarative integrity constraints are the constraints that can be specified during table creation and procedural integrity constraints are the constraints that are not possible to specify during table creation and for the specification of procedural integrity constraints triggers are used. Purpose of trigger is&lt;br /&gt;1.      To Create procedural integrity constraints&lt;br /&gt;2.      To record Audit information of a table.&lt;br /&gt;3.      To Make DML operation possible on complex view&lt;br /&gt;&lt;br /&gt;Trigger creation has the following syntax&lt;br /&gt;&lt;br /&gt;            Create trigger  trigger name&lt;br /&gt;            On Table/View name&lt;br /&gt;            For/After/Instead of&lt;br /&gt;            Insert / Update / Delete&lt;br /&gt;            As&lt;br /&gt;            Begin&lt;br /&gt;                        Statements&lt;br /&gt;            End&lt;br /&gt;&lt;br /&gt;Examples :&lt;br /&gt;1. This example will create a trigger that will restrict the user from performing DML operation on Dept table on Sunday.&lt;br /&gt;            Create trigger Sunday&lt;br /&gt;            On Dept&lt;br /&gt;            For insert,update,delete&lt;br /&gt;            As begin&lt;br /&gt;                        Declare @Day varchar(30)&lt;br /&gt;                        Set @Day=(Select datename(dw,getdate()))&lt;br /&gt;                        If @Day=’sunday’&lt;br /&gt;                        Begin&lt;br /&gt;                                    Print ‘Transaction Are Not Allowed on Sunday’&lt;br /&gt;                                    Rollback Transaction&lt;br /&gt;                        End&lt;br /&gt;            End&lt;br /&gt;&lt;br /&gt;2. This example will create a trigger on dept table that will record audit information of dept table in to another table called auditdept.&lt;br /&gt;            Create trigger Audit on Dept for insert,update,delete as begin&lt;br /&gt;                        Declare @Odno int,@ODn varchar(30),@OL varchar(30)&lt;br /&gt;                        Declare @Dno int,@Dn varchar(30),@L varchar(30)&lt;br /&gt;                        Set @Odno=(Select Deptno from Deleted)&lt;br /&gt;                        Set @Odn =(select Dname from Deleted)&lt;br /&gt;                        Set @OL=(Select Loc From Deleted)&lt;br /&gt;                        Set @Dno=(Select Deptno From Inserted)&lt;br /&gt;                        Set @Dn=(Select Dname From Inserted)&lt;br /&gt;                        Set @L=(Select Loc From Inserted)&lt;br /&gt;                        Insert into AuditDept values(@ODno,@ODn,@OL,@Dno,@Dn,@L,Getdate())&lt;br /&gt;            End&lt;br /&gt;&lt;br /&gt;Instead of triggers&lt;br /&gt;            When a view is created as complex view, DML operations will not be possible on that view. Instead of triggers are used to make DMLoperations possible on a complex view.&lt;br /&gt;Example: This example will create trigger on EMPDEPT view, which a complex view created from emp and dept tables and will make insert possible on this view.&lt;br /&gt;            Create Trigger InsteadInsert on Empdept  instead of insert as&lt;br /&gt;begin&lt;br /&gt;            Insert into emp select empno,ename,job,mgr,hiredate,sal,comm.,deptno from inserted.&lt;br /&gt;            End&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Deleting A Trigger&lt;br /&gt;&lt;br /&gt;To Delete a trigger use drop trigger command as follows&lt;br /&gt;&lt;br /&gt;                        Drop trigger TriggerName&lt;br /&gt;&lt;br /&gt;To get the list of trigger created on a table use the system procedure SP_HELPTRIGGER&lt;br /&gt;&lt;br /&gt;                        SP_HELPTRIGGER ‘TableName’&lt;br /&gt;&lt;br /&gt;            To get the code written for either a trigger or function or procedure or view, use SP_HELPTEXT system procedure.&lt;br /&gt;&lt;br /&gt;                        SP_HELPTEXT ‘TableName’&lt;br /&gt;&lt;a name="_Toc102597424"&gt;Microsoft SQL Server 2005 Overview&lt;/a&gt;&lt;br /&gt;&lt;a name="_Toc102597425"&gt;SQL Server Data Platform&lt;/a&gt;&lt;br /&gt;SQL Server is a comprehensive, integrated end-to-end data solution that empowers users across your organization by providing them with a secure, reliable, and productive platform for enterprise data and business intelligence (BI) applications.  SQL Server 2005 delivers powerful, familiar tools to Information Technology professionals as well as to information workers, reducing the complexity of creating, deploying, managing, and using enterprise data and analytical applications on platforms ranging from mobile devices to enterprise data systems.  Through a comprehensive feature set, interoperability with existing systems, and automation of routine tasks, SQL Server 2005 provides a complete data solution for enterprises of all sizes.  Figure 1 shows the layout of the SQL Server 2005 data platform.&lt;br /&gt;Figure 1: The SQL Server 2005 Data Platform&lt;br /&gt;The SQL Server data platform includes the following tools:&lt;br /&gt;·         Relational database: Secure, reliable, scalable, highly available relational database engine with improved performance and support for structured and unstructured (XML) data.&lt;br /&gt;·         Replication Services: Data replication for distributed or mobile data processing applications, high systems availability, scalable concurrency with secondary data stores for enterprise reporting solutions, and integration with heterogeneous systems, including existing Oracle databases.&lt;br /&gt;·         Notification Services: Advanced notification capabilities for the development and deployment of scalable applications that can deliver personalized, timely information updates to a variety of connected and mobile devices.&lt;br /&gt;·         Integration Services: Extract, transform, and load capabilities for data warehousing and enterprise-wide data integration.&lt;br /&gt;·         Analysis Services: Online analytical processing (OLAP) capabilities for the rapid, sophisticated analysis of large and complex datasets using multidimensional storage.&lt;br /&gt;·         Reporting Services: A comprehensive solution for creating, managing, and delivering both traditional, paper-oriented reports and interactive, Web-based reports.&lt;br /&gt;·         Management tools: SQL Server includes integrated management tools for advanced database management and tuning as well as tight integration with tools such as Microsoft Operations Manager (MOM) and Microsoft Systems Management Server (SMS). Standard data access protocols drastically reduce the time it takes to integrate data in SQL Server with existing systems. In addition, native Web service support is built into SQL Server to ensure interoperability with other applications and platforms.&lt;br /&gt;·         Development tools: SQL Server offers integrated development tools for the database engine, data extraction, transformation, and loading (ETL), data mining, OLAP, and reporting that are tightly integrated with Microsoft Visual Studio® to provide end-to-end application development capabilities. Every major subsystem in SQL Server ships with it’s own object model and set of APIs to extend the data system in any direction that is unique to your business.&lt;br /&gt;The SQL Server 2005 data platform provides organizations of all sizes with the following benefits:&lt;br /&gt;·         Leverage data assets: In addition to delivering a secure, reliable database for line-of-business and analytical applications, SQL Server 2005 enables customers to get more value from their data by including embedded functionality such as reporting, analysis, and data mining.&lt;br /&gt;·         Increase productivity:  Through comprehensive business intelligence capabilities and integration with familiar tools such as the Microsoft Office System, SQL Server 2005 provides information workers across your organization with critical, timely business information that is tailored to their specific needs.  The goal is to extend BI to all users within an organization and ultimately to allow users at all levels of the organization to make better business decisions based on one of their most valuable assets—their data.&lt;br /&gt;·         Reduce Information Technology complexity:  SQL Server 2005 simplifies the development, deployment, and management of line-of-business and analytical applications by providing a flexible development environment for developers and integrated, automated management tools for database administrators.&lt;br /&gt;·         Lower total cost of ownership (TCO): The integrated approach and focus on ease-of-use and deployment provides the industry’s lowest upfront, implementation, and maintenance costs for rapid return on your database investment.&lt;br /&gt;&lt;a name="_Toc102597426"&gt;What’s New in SQL Server 2005&lt;/a&gt;&lt;br /&gt;&lt;a name="_Toc102597427"&gt;Enterprise Data Management&lt;/a&gt;&lt;br /&gt;In today’s connected world, data and the systems that manage that data must always be secure yet available to your users. With SQL Server 2005, users and Information Technology professionals across your organization will benefit from reduced application downtime, increased scalability and performance, and tight yet flexible security controls. SQL Server 2005 also includes many new and improved capabilities to help make your Information Technology staff more productive. SQL Server 2005 includes key enhancements to enterprise data management in the following areas:&lt;br /&gt;·         Manageability&lt;br /&gt;·         Availability&lt;br /&gt;·         Scalability&lt;br /&gt;·         Security&lt;br /&gt;&lt;a name="_Toc102597428"&gt;Manageability&lt;/a&gt;&lt;br /&gt;SQL Server 2005 makes it simpler and easier to deploy, manage, and optimize enterprise data and analytical applications. As an enterprise data management platform, it provides a single management console that enables data administrators anywhere in your organization to monitor, manage, and tune all of the databases and associated services across your enterprise.  It provides an extensible management infrastructure that can be easily programmed using SQL Management Objects (SMO), enabling users to customize and extend their management environment and Independent Software Vendors (ISVs) to build additional tools and functionality to further extend the capabilities that come out of the box.&lt;br /&gt;SQL Server Management Studio&lt;br /&gt;SQL Server 2005 simplifies management by providing one integrated management console to monitor and manage the SQL Server relational database, as well as Integration Services, Analysis Services, Reporting Services, Notification Services, and SQL Mobile across large numbers of distributed servers and databases. Database administrators can perform several tasks at the same time including: authoring and executing a query, viewing server objects, managing an object, monitoring system activity, and viewing online help. SQL Server Management Studio hosts a development environment for authoring, editing and managing scripts and stored procedures using Transact-SQL, Multidimensional Expressions (MDX), XMLA, and SQL Server Mobile Edition. Management Studio is readily integrated with source control. Management Studio also hosts tools for scheduling SQL Server Agent jobs and managing maintenance plans to automate daily maintenance and operation tasks. The integration of management and authoring in a single tool coupled with the ability to manage all types of servers provides enhanced productivity for database administrators. &lt;br /&gt;Proactive Performance Monitoring and Performance Tuning&lt;br /&gt;SQL Server 2005 exposes more than 70 new measures of internal database performance and resource usage from memory, locking, and scheduling to transactions and network and disk I/O. These Dynamic Management Views (DMVs) provide greater transparency and visibility into the database and a powerful infrastructure for proactive monitoring of database health and performance.&lt;br /&gt;SQL Management Objects&lt;br /&gt;SQL Management Objects (SMO) is a new set of programming objects that exposes all of the management functionality of the SQL Server database. In fact, Management Studio was built with SQL Management Objects. SMO is implemented as a Microsoft .NET Framework assembly. You can use SMO to automate common SQL Server administrative tasks, such as programmatically retrieving configuration settings, creating new databases, applying Transact-SQL scripts, creating SQL Server Agent jobs, and scheduling backups. The SMO object model is a more secure, reliable, and scalable replacement for Distributed Management Objects (DMO), which was included with earlier versions of SQL Server.&lt;br /&gt;&lt;a name="_Toc102597429"&gt;Availability&lt;/a&gt;&lt;br /&gt;Investments in high availability technologies, additional backup and restore capabilities, and replication enhancements will enable enterprises to build and deploy highly available applications. Innovative high availability features such as; database mirroring, failover clustering, database snapshots, and enhanced online operations will minimize downtime and help to ensure that critical enterprise systems remain accessible.  We will review these enhancements in greater detail in this section.&lt;br /&gt;Database Mirroring&lt;br /&gt;Database mirroring allows continuous streaming of the transaction log from a source server to a single destination server. In the event of a failure of the primary system, applications can immediately reconnect to the database on the secondary server. The secondary instance detects failure of the primary server within seconds and accepts database connections immediately. Database mirroring works on standard server hardware and requires no special storage or controllers.  Figure 2 shows the basic configuration of database mirroring.&lt;br /&gt;Figure 2: Basic Configuration of Database Mirroring&lt;br /&gt;Failover Clustering&lt;br /&gt;Failover clustering is a high availability solution that exploits Microsoft Windows® Clustering Services to create fault-tolerant virtual servers that provide fast failover in the event of a database server failure.  In SQL Server 2005, support for failover clustering has been extended to SQL Server Analysis Services, Notification Services, and SQL Server replication. The maximum number of cluster nodes has been increased to eight. SQL Server failover clustering is now a complete fault-tolerant server solution.&lt;br /&gt;&lt;br /&gt;Availability Feature&lt;br /&gt;Database Mirroring&lt;br /&gt;Failover Clustering&lt;br /&gt;Automatic Failover&lt;br /&gt;Yes&lt;br /&gt;Yes&lt;br /&gt;Transparent Client Redirection&lt;br /&gt;Yes, auto-redirect&lt;br /&gt;Yes, reconnect to same IP&lt;br /&gt;Impact on Overall Throughput&lt;br /&gt;No impact to minimal&lt;br /&gt;No impact&lt;br /&gt;Zero Work Loss&lt;br /&gt;Yes&lt;br /&gt;Yes&lt;br /&gt;Requires Certified Hardware&lt;br /&gt;No&lt;br /&gt;Yes     &lt;br /&gt;Provides Redundant Data&lt;br /&gt;Yes&lt;br /&gt;No&lt;br /&gt;&lt;br /&gt;Database Snapshots&lt;br /&gt;SQL Server 2005 introduces the ability for database administrators to create instant, read-only views of a database. The database snapshot provides a stable view without the time or storage overhead of creating a complete copy of the database. As the primary database diverges from the snapshot, the snapshot adds its own copy of pages as they are modified. Thus the snapshot may be used to quickly recover from an accidental change to a database by simply reapplying the original pages from the snapshot to the primary database.&lt;br /&gt;Fast Recovery&lt;br /&gt;SQL Server 2005 improves the availability of SQL Server databases with a new faster recovery option. Users can reconnect to a recovering database after the transaction log has been rolled forward. Earlier versions of SQL Server required users to wait until incomplete transactions had rolled back, even if the users did not need to access the affected parts of the database.&lt;br /&gt;Dedicated Administrator Connection&lt;br /&gt;SQL Server 2005 introduces a dedicated administrator connection to access a running server even if the server is not responding or is otherwise unavailable. This allows you to execute diagnostic functions or Transact-SQL statements in order to troubleshoot problems on a server. The connection is activated by members of the sysadmin fixed server role and is only available through the SQLCMD command prompt utility either locally, or from a remote machine.&lt;br /&gt;Online Operations (index operations and restore)&lt;br /&gt;The ability to create, rebuild, or drop an index online is an enhanced feature of SQL Server 2005 that augments the indexing capabilities of earlier versions of SQL Server. The online index option allows concurrent modifications (updates, deletes, and inserts) to the underlying table or clustered index data and any associated indexes during index data definition language (DDL) execution. With support for online index operations, you can add indexes without interfering with access to tables or other existing indexes. Additionally, the server workload allows index operations to take advantage of parallel processing&lt;br /&gt;SQL Server 2005 also introduces the ability to perform a restore operation while an instance of SQL Server is running. Online restoration capabilities improve the availability of SQL Server because only the data that is being restored is unavailable. The rest of the database remains online and available. Earlier versions of SQL Server require that you bring a database offline before you restore the database.&lt;br /&gt;Replication&lt;br /&gt;Replication is designed to increase data availability by distributing the data across multiple database servers. Availability is increased by allowing applications to scale out the SQL Server read workload across databases. SQL Server 2005 offers enhanced replication using a new peer-to-peer model that provides a new topology in which databases can be synchronized transactionally with any identical peer database.&lt;br /&gt;&lt;a name="_Toc102597430"&gt;Scalability&lt;/a&gt;&lt;br /&gt;Scalability advancements such as table partitioning, snapshot isolation, and 64-bit support will enable you to build and deploy your most demanding applications using SQL Server 2005. The partitioning of large tables and indexes significantly enhances query performance against very large databases.&lt;br /&gt;&lt;br /&gt;Table and Index Partitioning&lt;br /&gt;Table and index partitioning eases the management of large databases by facilitating the management of the database in smaller, more manageable chunks. While the concept of partitioning data across tables, databases, and servers is not new to the world of databases, SQL Server 2005 provides a new capability for the partitioning of tables across filegroups in a database. Horizontal partitioning allows for the division of a table into smaller groupings based on a partitioning scheme. Table partitioning is designed for very large databases, from hundreds of gigabytes to terabytes and beyond.&lt;br /&gt;Snapshot Isolation&lt;br /&gt;Once data is copied, transformed, and archived to an analysis-oriented database it must be maintained and/or rebuilt periodically. Users certainly benefit from looking at a transactionally consistent version of the database; however, the version of the data that they are viewing is no longer current. It can take many hours to build and index the and that might not be what the user really needs. This is where snapshot isolation comes in. The snapshot isolation level allows users to access the last row that was committed, by using a transactionally consistent view of the database. This new isolation level provides the following benefits:&lt;br /&gt;·         Increased data availability for read-only applications.&lt;br /&gt;·         Nonblocking read operations allowed in an OLTP environment.&lt;br /&gt;·         Automatic mandatory conflict detection for write transactions.&lt;br /&gt;·         Simplified migration of applications from Oracle to SQL Server.&lt;br /&gt;Replication Monitor&lt;br /&gt;Replication Monitor is a tool that sets a new standard for ease of use in managing complex data replication operations with its intuitive user interface and wealth of data metrics.&lt;br /&gt;Support for 64-Bit System Itanium2 and x64&lt;br /&gt;Optimized for the Intel Itanium processor, SQL Server (64-bit) takes advantage of advanced memory addressing capabilities for essential resources such as buffer pools, caches, and sort heaps, reducing the need to perform multiple I/O operations to bring data in and out of memory from disk. Greater processing capacity without the penalties of I/O latency opens the door to new levels of application scalability.&lt;br /&gt;Windows Server™ 2003 x64 provides high performance for both 32-bit and 64-bit applications on the same system. The underlying architecture is based on 64-bit extensions to the industry-standard x86 instruction set, allowing today's 32-bit applications to run natively on x64 processors.  At the same time, new 64-bit applications are executed in 64-bit mode, which processes more data per clock cycle, allows greater access to memory, and speeds numeric calculations. The end result is a platform that leverages the existing wealth of 32-bit applications while also providing a smooth migration path to 64-bit computing.&lt;br /&gt;&lt;a name="_Toc102597431"&gt;Security&lt;/a&gt;&lt;br /&gt;SQL Server 2005 makes significant enhancements to the security model of the database platform, with the intention of providing more precise and flexible control to enable tighter security of the data. A considerable investment has been made in a number of features to provide a high level of security for your enterprise data including:&lt;br /&gt;·         Enforcing policies for SQL Server login passwords in the authentication space.&lt;br /&gt;·         Providing for more granularity in terms of specifying permissions at various scopes in the authorization space.&lt;br /&gt;·         Allowing for the separation of owners and schemas in the security management space.&lt;br /&gt;Authorization&lt;br /&gt;A new security model in SQL Server 2005 allows administrators to manage permissions at a granular level and at a designated scope, making management of permissions easier as well as ensuring that the principle of least privileges is upheld. SQL Server 2005 allows you to specify a context under which statements in a module execute. This feature also acts as an excellent mechanism for granular permission management.&lt;br /&gt;Authentication&lt;br /&gt;SQL Server 2005 clustering supports Kerberos authentication against a SQL Server 2005 virtual server. Administrators can specify Microsoft Windows-style policies on standard logins so that a consistent policy is applied across all accounts in the domain.&lt;br /&gt;Native Encryption&lt;br /&gt;SQL Server 2005 supports encryption capabilities within the database itself, fully integrated with a key management infrastructure. By default, client/server communications are encrypted. To centralize security assurance, server policy can be defined to reject unencrypted communications.&lt;br /&gt;SQL and Trustworthy Computing&lt;br /&gt;The Trustworthy Computing initiative outlines a framework that defines the steps necessary to support secure computing as well as measures that help you deploy and maintain a secure environment. These steps help to protect the confidentiality, integrity, and availability of data and systems at every phase of the software life cycle—from design, to delivery, to maintenance. To uphold the four tenets of the Trustworthy Computing initiative, Microsoft and the SQL Server team have taken the following steps:&lt;br /&gt;·         Secure by design.  The SQL Server development team conducted multiple security audits and spent more than two months studying SQL Server components and the interaction between them. For each potential security threat, the team did a threat analysis to evaluate the issue and completed additional design and testing work to neutralize potential security issues. As a result of these design efforts, SQL Server 2005 includes many new server security features.&lt;br /&gt;·         Secure by default. Upon installation, SQL Server 2005 chooses the right set of configuration values for all setup options, ensuring that when a new system is installed, it will be in a secure state by default.&lt;br /&gt;·         Secure in deployment. Microsoft has created content to help organizations deploy SQL Server using the proper security credentials and to fully understand the steps and permissions required. SQL Server deployment tools provide the information necessary to understand the decisions you need to make during deployment. Security updates are easy to find and install—and if you choose the option, the updates install automatically. Tools are also available to help you assess and manage security risks across organizations.&lt;br /&gt;&lt;a name="_Toc102597432"&gt;Developer Productivity&lt;/a&gt;&lt;br /&gt;SQL Server 2005 includes many new technologies that bring significant increases in developer productivity.  From .NET Framework support to tight integration with Visual Studio®, these features provide developers with the ability to more easily create secure, robust database applications at a lower cost.  SQL Server 2005 enables developers to leverage existing skills across a variety of development languages while providing
