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

<channel>
	<title>SQL - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/category/sql/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/category/sql/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Thu, 29 Sep 2022 09:17:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>SQL - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/category/sql/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Can you use UNIQUE KEY as a replacement for Primary Key ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/can-you-use-unique-key-as-a-replacement-for-primary-key/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/can-you-use-unique-key-as-a-replacement-for-primary-key/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Thu, 29 Sep 2022 09:17:56 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[can we use unique key as primary key]]></category>
		<category><![CDATA[difference between primary key and unique key]]></category>
		<category><![CDATA[difference between unique key and primary key]]></category>
		<category><![CDATA[foreign key and primary key]]></category>
		<category><![CDATA[how many null values in unique key]]></category>
		<category><![CDATA[primary key vs unique key]]></category>
		<category><![CDATA[primary keys vs unique keys]]></category>
		<category><![CDATA[unique key example]]></category>
		<category><![CDATA[unique key in sql]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4879</guid>

					<description><![CDATA[Both Keys are different. For Identifying each and every record in a table we use primary key. To apply additional uniqueness for other columns on the table we use Unique Key. Primary Keys are important for a table. Internal users use Primary Key whereas external users use unique key as it contains some meaningful information. [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">Both Keys are different. For Identifying each and every record in a table we use primary key.</li>
<li style="text-align: justify;">To apply additional uniqueness for other columns on the table we use Unique Key.</li>
<li style="text-align: justify;">Primary Keys are important for a table.</li>
<li style="text-align: justify;">Internal users use Primary Key whereas external users use unique key as it contains some meaningful information.</li>
<li style="text-align: justify;">When uniqueness is needed for multiple columns for a table, we use unique key for all columns and primary keys cannot be used in this case.</li>
<li style="text-align: justify;">Primary key uses clustered index by default and unique key uses Non-clustered index.</li>
</ul>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4880 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/unique-key-as-replacement-for-primary-key.jpg" alt="" width="680" height="352" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/unique-key-as-replacement-for-primary-key.jpg 680w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/unique-key-as-replacement-for-primary-key-300x155.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/unique-key-as-replacement-for-primary-key-390x202.jpg 390w" sizes="(max-width: 680px) 100vw, 680px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/can-you-use-unique-key-as-a-replacement-for-primary-key/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What are all the different attributes of indexes ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-are-all-the-different-attributes-of-indexes/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-are-all-the-different-attributes-of-indexes/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Thu, 29 Sep 2022 09:06:19 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[attributes of an index]]></category>
		<category><![CDATA[index attribute]]></category>
		<category><![CDATA[indexed attributes]]></category>
		<category><![CDATA[Indexes in SQL Server]]></category>
		<category><![CDATA[indexes in sql server with examples]]></category>
		<category><![CDATA[indexing attributes in the identity vault]]></category>
		<category><![CDATA[indexing in database]]></category>
		<category><![CDATA[indexing in dbms]]></category>
		<category><![CDATA[SQL Indexes]]></category>
		<category><![CDATA[types of index in mysql]]></category>
		<category><![CDATA[types of indexes]]></category>
		<category><![CDATA[types of indexes in database]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4875</guid>

					<description><![CDATA[The indexing has various attributes: Access Types: Value based search , range acess can be refered using Access types. Access Time: Time that is needed to find a data element or a set of elements are called Access Time. Insertion Time: Time needed to find an approriate space and insert a new data is known [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">The indexing has various attributes:</p>
<h3 id="access-types" style="text-align: justify;"><strong>Access Types</strong>:</h3>
<ul style="text-align: justify;">
<li>Value based search , range acess can be refered using Access types.</li>
</ul>
<h3 id="access-time" style="text-align: justify;"><strong>Access Time</strong>:</h3>
<ul style="text-align: justify;">
<li>Time that is needed to find a data element or a set of elements are called Access Time.</li>
</ul>
<h3 id="insertion-time" style="text-align: justify;"><strong>Insertion Time</strong>:</h3>
<ul style="text-align: justify;">
<li>Time needed to find an approriate space and insert a new data is known as Insertion Time.</li>
</ul>
<h3 id="deletion-time" style="text-align: justify;"><strong>Deletion Time</strong>:</h3>
<ul style="text-align: justify;">
<li>Time needed to find an element and delete that element as well as update its index structure is known as Deletion Time.</li>
</ul>
<h3 id="space-overhead" style="text-align: justify;"><strong>Space Overhead</strong>:</h3>
<ul style="text-align: justify;">
<li>Index always needs additional space which is provided by the space overhead.</li>
</ul>
<p><img decoding="async" class="alignnone size-full wp-image-4877 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/different-attributes-in-indexes.jpg" alt="" width="496" height="427" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/different-attributes-in-indexes.jpg 496w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/different-attributes-in-indexes-300x258.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/different-attributes-in-indexes-390x336.jpg 390w" sizes="(max-width: 496px) 100vw, 496px" /></p>
<p style="text-align: justify;">
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-are-all-the-different-attributes-of-indexes/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What are the different types of SQL commands ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-are-the-different-types-of-sql-commands/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-are-the-different-types-of-sql-commands/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Tue, 27 Sep 2022 10:48:22 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[DCL and TCL Commands]]></category>
		<category><![CDATA[DDL]]></category>
		<category><![CDATA[ddl commands]]></category>
		<category><![CDATA[ddl commands in sql with syntax and examples]]></category>
		<category><![CDATA[ddl commands with examples]]></category>
		<category><![CDATA[DML]]></category>
		<category><![CDATA[dml commands]]></category>
		<category><![CDATA[dml commands in sql with examples]]></category>
		<category><![CDATA[DQL]]></category>
		<category><![CDATA[List of SQL Commands with Example]]></category>
		<category><![CDATA[SQL Commands]]></category>
		<category><![CDATA[SQL commands in SQL Server]]></category>
		<category><![CDATA[sql commands with example]]></category>
		<category><![CDATA[Types of SQL Commands]]></category>
		<category><![CDATA[types of sql commands with examples]]></category>
		<category><![CDATA[What are the different types of SQL commands?]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4872</guid>

					<description><![CDATA[DDL (Data Definition Language) DML (Data Manipulation Language) DCL (Data Control Language) TCL (Transaction Control Language) DDL(Data Definition Language) DDL is a syntax that is used for creating SQL commands. It is called as DDL becuase it defines the syntax for creating a data base. DDL is part of SQL which defines the data structure [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">DDL (Data Definition Language)</li>
<li style="text-align: justify;">DML (Data Manipulation Language)</li>
<li style="text-align: justify;">DCL (Data Control Language)</li>
<li style="text-align: justify;">TCL (Transaction Control Language)</li>
</ul>
<p style="text-align: justify;"><img decoding="async" class="alignnone size-full wp-image-4873 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/sql-commands.jpg" alt="" width="535" height="294" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/sql-commands.jpg 535w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/sql-commands-300x165.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/sql-commands-390x214.jpg 390w" sizes="(max-width: 535px) 100vw, 535px" /></p>
<h3 id="ddldata-definition-language" style="text-align: justify;"><strong>DDL(Data Definition Language)</strong></h3>
<ul style="text-align: justify;">
<li>DDL is a syntax that is used for creating SQL commands. It is called as DDL becuase it defines the syntax for creating a data base.</li>
<li>DDL is part of SQL which defines the data structure of the database at the initial stage when creating a database  and is also used for creating and modification of the structure of the database.</li>
</ul>
<h4 id="commands-in-ddl-are" style="text-align: justify;"><strong>Commands in DDL are</strong></h4>
<ul style="text-align: justify;">
<li><strong>Create table</strong><strong>:</strong> This command is used to create a table in a database or its objects (like table, index, function, views, store procedure, and triggers).</li>
<li><strong>Alter table</strong><strong>:</strong> This is used to alter the structure of the database.</li>
<li><strong>Drop table</strong><strong>:</strong> This command is used to delete objects from the database.</li>
</ul>
<h3 id="data-manipulation-language" style="text-align: justify;"><strong>Data Manipulation Language</strong></h3>
<ul style="text-align: justify;">
<li>DML uses the existing data base for manipulation of data.</li>
<li>It helps users to retreive the data and perform manipulation on the data like inserting data, updating data, and deleting data using the following data manipulation commands like insert, update and delete.</li>
</ul>
<h3 id="data-control-language" style="text-align: justify;"><strong>Data Control Language</strong></h3>
<ul style="text-align: justify;">
<li>As the name suggests data control language provides control for accessing the data in the database.</li>
<li>These commands are usually used for providing previlages and controls to users who likes to access the database.</li>
<li>Commands used in DCL for control and user previlages are Grant and Revoke.</li>
</ul>
<h3 id="transaction-control-language" style="text-align: justify;"><strong>Transaction Control Language</strong></h3>
<ul style="text-align: justify;">
<li>TCL command statements are used to control changes made by the DML commands.</li>
<li>It also authorizes the statements to assemble in conjunction into logical transactions.</li>
<li>The commands that are used in TCL are Commit, Rollback, Savepoint, Begin, and Transaction.</li>
</ul>
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-are-the-different-types-of-sql-commands/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Difference between SQL and PLSQL</title>
		<link>https://www.wikitechy.com/interview-questions/sql/difference-between-sql-and-plsql/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/difference-between-sql-and-plsql/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Tue, 27 Sep 2022 10:40:47 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[difference between sql & pl/sql]]></category>
		<category><![CDATA[difference between sql and mysql]]></category>
		<category><![CDATA[difference between sql and plsql]]></category>
		<category><![CDATA[SQL vs PL/SQL]]></category>
		<category><![CDATA[sql vs pl/sql vs t-sql]]></category>
		<category><![CDATA[what is pl/sql]]></category>
		<category><![CDATA[what is the main difference between sql and pl/sql]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4869</guid>

					<description><![CDATA[SQL PL/SQL SQL is structural query language for database. It has no variables. Pl/SQL is a programming language using SQL for database. It has variables and data types SQL has no if condition, loops and similar structures Pl/SQL has for loops, if condition, while loop and other similar structures SQL can execute single command at [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4870 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/difference-between-sql-and-plsql.jpg" alt="" width="694" height="317" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/difference-between-sql-and-plsql.jpg 694w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/difference-between-sql-and-plsql-300x137.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/difference-between-sql-and-plsql-390x178.jpg 390w" sizes="(max-width: 694px) 100vw, 694px" /></p>
<table>
<tbody>
<tr>
<td width="143">
<p style="text-align: center;"><strong>SQL</strong></p>
</td>
<td width="210">
<p style="text-align: center;"><strong>PL/SQL</strong></p>
</td>
</tr>
<tr>
<td width="143">SQL is structural query language for database. It has no variables.</td>
<td width="210">Pl/SQL is a programming language using SQL for database. It has variables and data types</td>
</tr>
<tr>
<td width="143">SQL has no if condition, loops and similar structures</td>
<td width="210">Pl/SQL has for loops, if condition, while loop and other similar structures</td>
</tr>
<tr>
<td width="143">SQL can execute single command at a time</td>
<td width="210">It can perform multiple operations at a time</td>
</tr>
<tr>
<td width="143">SQL is a declarative language</td>
<td width="210">It is a procedural language</td>
</tr>
<tr>
<td width="143">SQL can be embedded in PL/SQL block</td>
<td width="210">Can also be embedded in SQL code</td>
</tr>
<tr>
<td width="143">SQL directly interacts with database server.</p>
<p>&nbsp;</td>
<td width="210">Pl/SQL does not directly interact with database server.</td>
</tr>
<tr>
<td width="143">SQL is a data oriented language</td>
<td width="210">Pl/SQL is an application oriented language</td>
</tr>
<tr>
<td width="143">SQL is used to write queries, create and execute DDL and DML Commands</td>
<td width="210">Pl/SQL is used to write program blocks, functions, procedures,triggers and packages</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
<p style="text-align: justify;">
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/difference-between-sql-and-plsql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Char vs Varchar in SQL</title>
		<link>https://www.wikitechy.com/interview-questions/sql/char-vs-varchar-in-sql/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/char-vs-varchar-in-sql/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Tue, 27 Sep 2022 09:31:25 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[and VARCHAR2 Difference Between CHAR and VARCHAR and VARCHAR2]]></category>
		<category><![CDATA[CHAR vs VARCHAR in SQL]]></category>
		<category><![CDATA[Difference between char]]></category>
		<category><![CDATA[difference between char and varchar class 10]]></category>
		<category><![CDATA[Difference between CHAR and VARCHAR2 in sql]]></category>
		<category><![CDATA[difference between varchar and varchar2 and nvarchar]]></category>
		<category><![CDATA[difference between varchar and varchar2 in mysql]]></category>
		<category><![CDATA[difference between varchar and varchar2 sql]]></category>
		<category><![CDATA[How are VARCHAR and VARCHAR2 different ?]]></category>
		<category><![CDATA[shoud I use char or varchar2]]></category>
		<category><![CDATA[VARCHAR]]></category>
		<category><![CDATA[varchar and VARCHAR2 in sql]]></category>
		<category><![CDATA[varchar varchar2 and nvarchar in sql]]></category>
		<category><![CDATA[varchar2 data type]]></category>
		<category><![CDATA[varchar2 in sql]]></category>
		<category><![CDATA[varchar2(10) means]]></category>
		<category><![CDATA[What is the major difference between Varchar2 and char]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4864</guid>

					<description><![CDATA[Char VarChar Char data type is used for storing single character values It is a SQL Code that helps in storing variable character Used to store characters string of fixed length specified If a length of a string is less than the set or fixed length then it will store as it is without including [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4867 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/char-vs-varchar-in-sql.jpg" alt="" width="608" height="425" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/char-vs-varchar-in-sql.jpg 608w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/char-vs-varchar-in-sql-300x210.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/char-vs-varchar-in-sql-390x273.jpg 390w" sizes="(max-width: 608px) 100vw, 608px" /></p>
<table>
<tbody>
<tr>
<td width="172">
<h3 id="char" style="text-align: center;"><strong>Char</strong></h3>
</td>
<td width="181">
<h3 id="varchar" style="text-align: center;"><strong>VarChar</strong></h3>
</td>
</tr>
<tr>
<td width="172">Char data type is used for storing single character values</td>
<td width="181">It is a SQL Code that helps in storing variable character</td>
</tr>
<tr>
<td width="172">Used to store characters string of fixed length specified</td>
<td width="181">If a length of a string is less than the set or fixed length then it will store as it is without including any extra blank spaces.</p>
<p>&nbsp;</td>
</tr>
<tr>
<td width="172">Size is fixed. Cannot be changed during runtime</td>
<td width="181">Storage size of VARCHAR datatype is equal to the actual length of the entered string in bytes.</p>
<p>&nbsp;</td>
</tr>
<tr>
<td width="172">Can Store only characters</td>
<td width="181">We should use this datatype when we expect the data values in a column are of variable length.</p>
<p>&nbsp;</td>
</tr>
<tr>
<td width="172">Memory is allocation is <strong>Static</strong></td>
<td width="181">Memory is allocated <strong>Dynamically</strong></td>
</tr>
<tr>
<td width="172">Per Character contains 1 byte</td>
<td width="181">For Storing it uses 1 byte per character Plus 1 or 2 extra bytes for stroing varying length.</td>
</tr>
<tr>
<td width="172">Since the size of the char is fixed and cannot be changed, there will be a memory wastage.</p>
<p>&nbsp;</td>
<td width="181">To store a character string value of set length then varchar data type is used</td>
</tr>
</tbody>
</table>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/char-vs-varchar-in-sql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is Default constraint in SQL ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-is-default-constraint-in-sql/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-is-default-constraint-in-sql/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Tue, 27 Sep 2022 06:00:52 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[add default constraint in sql]]></category>
		<category><![CDATA[check constraint in sql]]></category>
		<category><![CDATA[default constraint in mysql]]></category>
		<category><![CDATA[default constraint in oracle]]></category>
		<category><![CDATA[default in sql]]></category>
		<category><![CDATA[drop default constraint in sql]]></category>
		<category><![CDATA[how to use default in sql]]></category>
		<category><![CDATA[index constraint in sql]]></category>
		<category><![CDATA[mysql default constraint]]></category>
		<category><![CDATA[set default value in sql select query]]></category>
		<category><![CDATA[SQL DEFAULT Constraint]]></category>
		<category><![CDATA[sql default constraint with examples]]></category>
		<category><![CDATA[what is default constraint in sql]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4860</guid>

					<description><![CDATA[Constraints are a certain set of rules used for processing data and limiting the type of data that can go into the table. The default constraint is used to define a default value for a column so that the default value will be added to all new records if no other value is specified. For [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">Constraints are a certain set of rules used for processing data and limiting the type of data that can go into the table.</li>
<li style="text-align: justify;">The default constraint is used to define a default value for a column so that the default value will be added to all new records if no other value is specified.</li>
<li style="text-align: justify;">For example, if we set the default value to 85000 as a default constraint for the E_salary column, then all the other entries in the column will have a default constraint value of 85000 until no other values have been assigned for default constraint during insertion.</li>
</ul>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4862 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/default-constraint-sql.png" alt="" width="1030" height="374" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/default-constraint-sql.png 1030w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/default-constraint-sql-300x109.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/default-constraint-sql-1024x372.png 1024w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/default-constraint-sql-768x279.png 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/default-constraint-sql-390x142.png 390w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/default-constraint-sql-820x298.png 820w" sizes="(max-width: 1030px) 100vw, 1030px" /></p>
<p style="text-align: justify;">Syntax for setting a default constraint. Start by  creating a new table and adding a default constraint to one of its columns.</p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">create table stu1(s_id int, s_name varchar(20), s_marks int default 50)</code></pre> </div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-is-default-constraint-in-sql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What are the different types of relationships in SQL ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-are-the-different-types-of-relationships-in-sql/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-are-the-different-types-of-relationships-in-sql/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Tue, 27 Sep 2022 05:48:21 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Database Relationships]]></category>
		<category><![CDATA[one-to-many relationship sql]]></category>
		<category><![CDATA[relationship in sql]]></category>
		<category><![CDATA[relationship in sql with example]]></category>
		<category><![CDATA[Relationships in SQL]]></category>
		<category><![CDATA[Tables Relations in SQL Server]]></category>
		<category><![CDATA[Types of Relationship in Database Table]]></category>
		<category><![CDATA[types of relationship in database with example]]></category>
		<category><![CDATA[types of relationships in database]]></category>
		<category><![CDATA[what are the 3 types of relationships in a database]]></category>
		<category><![CDATA[What are the different types of relationships in DBMS ?]]></category>
		<category><![CDATA[what is relationship in sql]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4856</guid>

					<description><![CDATA[Data base collects different types of data that uses tables, record, and columns. For easy storage of data, a well-defined relationship is created between tables and databases. Data in a table is based on a relational model. A unique Id and the key is created for each row. Data attributes are held in the column [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">Data base collects different types of data that uses tables, record, and columns.</li>
<li style="text-align: justify;">For easy storage of data, a well-defined relationship is created between tables and databases.</li>
<li style="text-align: justify;">Data in a table is based on a relational model.</li>
<li style="text-align: justify;">A unique Id and the key is created for each row.</li>
<li style="text-align: justify;">Data attributes are held in the column of the table.</li>
</ul>
<h2 id="different-types-of-relational-database-tables" style="text-align: justify;">Different Types of Relational DataBase Tables</h2>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4858 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/types-of-relationship-in-sql-1.jpg" alt="" width="675" height="464" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/types-of-relationship-in-sql-1.jpg 675w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/types-of-relationship-in-sql-1-300x206.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/types-of-relationship-in-sql-1-390x268.jpg 390w" sizes="(max-width: 675px) 100vw, 675px" /></p>
<h3 id="one-to-one-relationship" style="text-align: justify;">One to One Relationship</h3>
<ul style="text-align: justify;">
<li>This relationship helps to create a relationship between tables where a single row of the first table can only be related to one and only one record of the second row.</li>
<li>The same way one record of the second table can be related to one and only one record of the first table.</li>
</ul>
<h3 id="one-to-many-relationship" style="text-align: justify;">One to many Relationship</h3>
<ul style="text-align: justify;">
<li>This helps to create a relationship between the two tables.</li>
<li>Any single row of a table can be connected to one or more rows in a second table.</li>
<li>Rows from the second table can relate to only one row in the first table. This relationship is known as one to many relationship.</li>
</ul>
<h3 id="many-to-many-relationship" style="text-align: justify;">Many to Many Relationship</h3>
<ul style="text-align: justify;">
<li>Here relationship is created between two tables.</li>
<li>Each record in the first table can be related to many records in the second table.</li>
<li>Similarly, each record from the second row can relate to any records in the first row.</li>
<li>It is represented as N: N.</li>
</ul>
<p style="text-align: justify;">
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-are-the-different-types-of-relationships-in-sql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Types of indexes in SQL</title>
		<link>https://www.wikitechy.com/interview-questions/sql/types-of-indexes-in-sql/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/types-of-indexes-in-sql/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Mon, 26 Sep 2022 11:36:47 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[3 major types of indexes]]></category>
		<category><![CDATA[explain the types of indexes]]></category>
		<category><![CDATA[indexed in sql server with examples]]></category>
		<category><![CDATA[sql queries on clustered and non-clustered indexes]]></category>
		<category><![CDATA[types of indexes]]></category>
		<category><![CDATA[types of indexes in mysql]]></category>
		<category><![CDATA[types of indexes in sql]]></category>
		<category><![CDATA[types of indexes in sql server]]></category>
		<category><![CDATA[types of indexes in sql with example]]></category>
		<category><![CDATA[types of indexes in sql with examples]]></category>
		<category><![CDATA[types on index in sql]]></category>
		<category><![CDATA[what are indexed and types of indexes in sql]]></category>
		<category><![CDATA[what are the types of indexes in sql server]]></category>
		<category><![CDATA[what is index in sql]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4853</guid>

					<description><![CDATA[There are various types of indexes in SQL server: Clustered Index Non-Clustered Index Column Store Index Filtered Index Hash Index Unique Index Clustered Index Rows of data are sorted and stored data in a table or view depending on the central values by clustered index. Each table can have one clustered index as it enables the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">There are various types of indexes in SQL server:</p>
<ul style="text-align: justify;">
<li>Clustered Index</li>
<li>Non-Clustered Index</li>
<li>Column Store Index</li>
<li>Filtered Index</li>
<li>Hash Index</li>
<li>Unique Index</li>
</ul>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4854 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/types-of-index-in-sql.jpg" alt="" width="654" height="427" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/types-of-index-in-sql.jpg 654w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/types-of-index-in-sql-300x196.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/types-of-index-in-sql-390x255.jpg 390w" sizes="(max-width: 654px) 100vw, 654px" /></p>
<h2 id="clustered-index" style="text-align: justify;"><strong>Clustered Index</strong></h2>
<ul style="text-align: justify;">
<li>Rows of data are sorted and stored data in a table or view depending on the central values by clustered index.</li>
<li>Each table can have one clustered index as it enables the user to store the data in a single order.</li>
<li>Data is sorted and stored in gathered index, so if we see a data in a table sorted means it is arranged with clustered index.</li>
<li>If a table contains clustered index, it is called as clustered table.</li>
<li>When a huge data needs to mdified in a database we use clustered index.</li>
</ul>
<h2 id="non-clustered-index" style="text-align: justify;"><strong>Non Clustered index</strong></h2>
<ul style="text-align: justify;">
<li>Non clustered index are structures that are seperated from the data row.</li>
<li>This type of index contains non clustered key values and those pairs has a pointer to that data row.</li>
<li>In non clustered index, arrow from an index row to data row is called as row locator.</li>
<li>Row locator structure identifies whether the data pages are in the form of clustered table or heap.</li>
<li>Row locator is termed as cluster index key in clustered chart.</li>
<li>User can easily add non key columns to the leaf level in a non clustered index as it byepasses the existing index key limits to perform fully covered indexed queries.</li>
<li>A non clustered index is created to improve the overall performance of frequently asked questions which cannot be created in clustered items.</li>
</ul>
<h3 id="unique-index" style="text-align: justify;"><strong>Unique Index</strong></h3>
<ul style="text-align: justify;">
<li>It enables users to confirm that every row in the table is unique in one way or other by checking if the indexing key contains any duplicate values.</li>
<li>When user wants to use the unique character of data he can use unique index.</li>
<li>Unique index allows indidviduals to ensure that data integrity of each defined column of the table in the database.</li>
<li>It provides additional information about the data table which is helpful for query optimizer.</li>
</ul>
<h3 id="filtered-index" style="text-align: justify;"><strong>Filtered Index</strong></h3>
<ul style="text-align: justify;">
<li>This index is created when column has only a small number of relevent values for queries on the subset of values.</li>
<li>When table contains hetrogeneous data rows, a filtered index is created in sql for one or more data types.</li>
<li>Filtered index is indicate even when query optimizer does not cover any query.</li>
<li>Filtered index indexes the portion of rows in a table, it applies filter on index by improving the overall performance of the query.</li>
<li>Filtered index helps to reduce the maintanence cost and storage cost</li>
<li>Overall impact of data modification is less in filtered index as it is updated only when a new record is inserted or when the data of the index is impacted.</li>
</ul>
<h3 id="column-store-index" style="text-align: justify;"><strong>Column Store Index</strong></h3>
<ul style="text-align: justify;">
<li>Column store index is standard form of index when it comes to storing and querying the large data warehousing tables.</li>
<li>This index was designed for the impovement in the performance of query in case of workloads with vast data.</li>
<li>Data are stored as column based format.</li>
<li>It reduces overall storage cost and provides high level compression of data.</li>
<li>Since data compression happens, user can efficiently perform input and output functions for a high performance result.</li>
</ul>
<h2 id="hash-index" style="text-align: justify;"><strong>Hash Index</strong></h2>
<ul style="text-align: justify;">
<li style="text-align: justify;">Hash index is simply an array in sql that contains pointer slot and a row on each slot.</li>
<li style="text-align: justify;">Hash index use hash function F(K,N) where K is critical and N is number of Buckets.</li>
<li style="text-align: justify;">Function maps out to key corresponding to the bucket of the hash index.</li>
<li style="text-align: justify;">Each hash bucket index contains 8 bytes which is used to store the memory address of the linked list of critical entities.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/types-of-indexes-in-sql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is the difference between BETWEEN and IN operators in SQL ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-between-and-in-operators-in-sql/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-between-and-in-operators-in-sql/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Mon, 26 Sep 2022 09:59:45 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[between & in operator]]></category>
		<category><![CDATA[between operator in sql]]></category>
		<category><![CDATA[between operator in sql for dates]]></category>
		<category><![CDATA[difference between between and in operator]]></category>
		<category><![CDATA[difference between in and any operators in sql]]></category>
		<category><![CDATA[difference between in and between operator in sql]]></category>
		<category><![CDATA[difference between in and not in operator]]></category>
		<category><![CDATA[explain between operator with example]]></category>
		<category><![CDATA[in operators in sql]]></category>
		<category><![CDATA[like and between operators in sql]]></category>
		<category><![CDATA[like operator in sql]]></category>
		<category><![CDATA[sql between operator]]></category>
		<category><![CDATA[sql in & between operator]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4850</guid>

					<description><![CDATA[BETWEEN IN This condition allows you to check if given values are in the specified range. In operator is used for matching values in the given list of values. &#160; Values can be text, date or numbers. &#160; In operator can be used to remove multiple or condition in select, Insert, update, or delete. &#160; [&#8230;]]]></description>
										<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td width="181">
<p style="text-align: center;"><strong>BETWEEN</strong></p>
</td>
<td width="173">
<p style="text-align: center;"><strong>IN</strong></p>
</td>
</tr>
<tr>
<td width="181">
<p style="text-align: justify;">This condition allows you to check if given values are in the specified range.</p>
<p style="text-align: justify;">
</td>
<td style="text-align: justify;" width="173">In operator is used for matching values in the given list of values.</p>
<p>&nbsp;</td>
</tr>
<tr style="text-align: justify;">
<td width="181">Values can be text, date or numbers.</p>
<p>&nbsp;</td>
<td width="173">In operator can be used to remove multiple or condition in select, Insert, update, or delete.</p>
<p>&nbsp;</td>
</tr>
<tr style="text-align: justify;">
<td width="181">Between commands can be used in Select, Insert, update or delete.</p>
<p>&nbsp;</td>
<td width="173">Not In is used to exclude rows in the list.</td>
</tr>
<tr style="text-align: justify;">
<td width="181">This condition will return records between the range of values 1 and 2.</p>
<p>&nbsp;</td>
<td width="173">Duplicate entries are retained.</p>
<p>&nbsp;</td>
</tr>
<tr>
<td style="text-align: justify;" width="181"><strong>Syntax:</strong></p>
<p>SELECT Fname, Lname</p>
<p>FROM Employee</p>
<p>WHERE Salary</p>
<p>BETWEEN 30000 AND 45000;</p>
<p>&nbsp;</td>
<td width="173">
<p style="text-align: justify;"><strong>Syntax: </strong></p>
<p style="text-align: justify;">SELECT Fname, Lname</p>
<p style="text-align: justify;">FROM Employee</p>
<p style="text-align: justify;">WHERE Salary IN (30000, 40000, 25000);</p>
<p style="text-align: justify;">
</td>
</tr>
</tbody>
</table>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4851 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/difference-between-in-and-between.jpg" alt="" width="673" height="479" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/difference-between-in-and-between.jpg 673w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/difference-between-in-and-between-300x214.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/difference-between-in-and-between-390x278.jpg 390w" sizes="(max-width: 673px) 100vw, 673px" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-between-and-in-operators-in-sql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is a join in SQL ? What are the types of joins ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-is-a-join-in-sql-what-are-the-types-of-joins/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-is-a-join-in-sql-what-are-the-types-of-joins/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Mon, 26 Sep 2022 09:24:54 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[cross join in sql]]></category>
		<category><![CDATA[different types of sql joins]]></category>
		<category><![CDATA[inner join in sql]]></category>
		<category><![CDATA[outer join in sql]]></category>
		<category><![CDATA[self join in sql]]></category>
		<category><![CDATA[sql join types explained]]></category>
		<category><![CDATA[sql joins]]></category>
		<category><![CDATA[sql joins explained]]></category>
		<category><![CDATA[types of joins in dbms]]></category>
		<category><![CDATA[types of joins in sql server]]></category>
		<category><![CDATA[types of joins in sql with example]]></category>
		<category><![CDATA[Types of SQL JOIN]]></category>
		<category><![CDATA[types of sql joins explained with examples]]></category>
		<category><![CDATA[what are sql joins]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4844</guid>

					<description><![CDATA[Data is stored in multiple tables that are related to each other in relational data bases like SQL Server, MySQL etc with a common key value. When we need to get row by combining one or more tables based on common fields between them can be achieved using a SQL Join. When we need to [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">Data is stored in multiple tables that are related to each other in relational data bases like SQL Server, MySQL etc with a common key value.</li>
<li style="text-align: justify;">When we need to get row by combining one or more tables based on common fields between them can be achieved using a SQL Join.</li>
<li style="text-align: justify;">When we need to extract records from two or more tables into a new table, JOIN clause helps us to acheive this based on certain condition.</li>
<li style="text-align: justify;">Based on logical relationship between tables join clause helps us to query and access data from multiple tables.</li>
<li style="text-align: justify;">In other words, Join show how data from a row can be fetched from one table to another table.</li>
</ul>
<p style="text-align: justify;">Different types of Joins are:</p>
<ul style="text-align: justify;">
<li>Inner join/Simple Join</li>
<li>Left Outer join/Left Join</li>
<li>Right Outer Join/Right join</li>
<li>Full Outer join</li>
<li>Cross Join</li>
<li>Self Join</li>
</ul>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4848 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/different-types-of-joins.jpg" alt="" width="468" height="384" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/different-types-of-joins.jpg 468w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/different-types-of-joins-300x246.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/09/different-types-of-joins-390x320.jpg 390w" sizes="(max-width: 468px) 100vw, 468px" /></p>
<h3 id="inner-join" style="text-align: justify;"><strong>Inner Join</strong></h3>
<ul style="text-align: justify;">
<li>In SQL if a defined condition is valid the inner join will select all the matching rows and columns from both tables.</li>
</ul>
<p style="text-align: justify;"><strong>Syntax</strong></p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">Select column_1, column_2 column_3 from table_1 innerjoin table_2 ON table_1.column = table_2.column;</code></pre> </div>
<h3 id="left-join" style="text-align: justify;"><strong>Left Join</strong></h3>
<ul style="text-align: justify;">
<li>In left join all records are retrived from left table(table1) and matched rows and column from right table(table2).</li>
<li>If there is no matching rows or columns, left join returns NULL.</li>
</ul>
<p style="text-align: justify;"><strong>Syntax</strong></p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">Select column_1, column_2, columns from Table_1 left join table_2 ON table_1.column_name = table_2.column name.</code></pre> </div>
<h3 id="right-join-or-right-outer-join" style="text-align: justify;"><strong>Right Join or Right Outer Join</strong></h3>
<ul style="text-align: justify;">
<li>Records from the right table are retrived in RIGHT JOIN and the matched rows or columns from the left table(table1).</li>
<li>If there is no matching rows or columns it will return NULL.</li>
</ul>
<p style="text-align: justify;"><strong>Syntax</strong></p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">Select column_1, column_2, cloumn(s) FROM table_1 right join table_2 ON table_1.column_name= table2.column_name.</code></pre> </div>
<h3 id="full-join-or-full-outer-join" style="text-align: justify;"><strong>Full Join or Full Outer Join</strong></h3>
<ul style="text-align: justify;">
<li>This join is a combination of both Left join and right join.</li>
<li>The joined tables returns all the records from both the tables.</li>
<li>If no matches are found in the table, this join will return a NULL Value.</li>
<li>It is also called as Full Outer Join.</li>
</ul>
<p style="text-align: justify;"><strong>Syntax</strong></p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">Select column_1, column_2, column(s) from table_1 Full join table_2 ON table_1.column_name = table_2.column_name;</code></pre> </div>
<h3 id="cross-join" style="text-align: justify;"><strong>Cross Join</strong></h3>
<ul style="text-align: justify;">
<li>It is also known as Cartesian Join which returns cartesian product of two or more joined tables.</li>
<li>Cross join produces a table that merges each rows from the first table with each rows of second table.</li>
<li>No condition ir required for CROSS JOIN.</li>
</ul>
<p style="text-align: justify;"><strong>Syntax</strong></p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">Select * from table_1 cross join table_2;  <br/>Or,<br/>Select column1, column2, column3 from table_1, table_2; </code></pre> </div>
<h3 id="self-join" style="text-align: justify;"><strong>Self Join</strong></h3>
<ul style="text-align: justify;">
<li>Tables formed by joining itself is called Self Join.</li>
<li>It makes a temporary naming of atleast one table in SQL Statement.</li>
</ul>
<p style="text-align: justify;"><strong>Syntax</strong></p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">Select column1, column2, column(s) from table_1 Tbl1, table_2 Tbl2 where condition;  </code></pre> </div>
<p style="text-align: justify;">
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-is-a-join-in-sql-what-are-the-types-of-joins/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What are the different types of database management systems ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-are-the-different-types-of-database-management-systems/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-are-the-different-types-of-database-management-systems/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Sat, 20 Aug 2022 08:25:40 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[application of database management system]]></category>
		<category><![CDATA[database management system]]></category>
		<category><![CDATA[relational database management system]]></category>
		<category><![CDATA[types of database management system]]></category>
		<category><![CDATA[types of database management system with examples]]></category>
		<category><![CDATA[types of database system]]></category>
		<category><![CDATA[types of databases]]></category>
		<category><![CDATA[types of dbms]]></category>
		<category><![CDATA[types of dbms in sql]]></category>
		<category><![CDATA[what are the 4 types of database]]></category>
		<category><![CDATA[what are the different types of dbms]]></category>
		<category><![CDATA[what is database management system]]></category>
		<category><![CDATA[what is dbms]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4838</guid>

					<description><![CDATA[Database Management System is classified into four types: Hierarchical Database It is a tree like structure where the data is stored in form of a tree. In this type of database the parent may have many children but child should have single parent. Network Database This data base is represented as graph that allows many [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">Database Management System is classified into four types:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4839 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/different-types-of-database-managment-services.jpg" alt="different-types-of-database-managment-services" width="578" height="410" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/different-types-of-database-managment-services.jpg 578w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/different-types-of-database-managment-services-300x213.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/different-types-of-database-managment-services-390x277.jpg 390w" sizes="(max-width: 578px) 100vw, 578px" /></p>
<h2 id="hierarchical-database"><strong>Hierarchical Database</strong></h2>
<ul>
<li>It is a tree like structure where the data is stored in form of a tree.</li>
<li>In this type of database the parent may have many children but child should have single parent.</li>
</ul>
<h2 id="network-database"><strong>Network Database</strong></h2>
<ul style="text-align: justify;">
<li>This data base is represented as graph that allows many to many relationships.</li>
<li>In this data base children can have multiple children.</li>
</ul>
<h2 id="relational-database"><strong>Relational Database</strong></h2>
<ul style="text-align: justify;">
<li>This relational database is represented in the form of a table.</li>
<li>Values in rows and column are associated with each other. This database is widely used as it is very easy to use.</li>
</ul>
<h2 id="object-oriented-database"><strong>Object-Oriented Database</strong></h2>
<ul style="text-align: justify;">
<li>In this data base everything is stored as objects.</li>
<li style="text-align: justify;">All the objects in this database will have multiple relationships among them.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-are-the-different-types-of-database-management-systems/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is a Database ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-is-a-database/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-is-a-database/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Sat, 20 Aug 2022 08:14:29 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[database examples]]></category>
		<category><![CDATA[types of database]]></category>
		<category><![CDATA[what is a database]]></category>
		<category><![CDATA[what is a database administrator]]></category>
		<category><![CDATA[what is a database definition]]></category>
		<category><![CDATA[what is a database design]]></category>
		<category><![CDATA[what is a database field]]></category>
		<category><![CDATA[what is a database in access]]></category>
		<category><![CDATA[what is a database in sql]]></category>
		<category><![CDATA[what is a database management]]></category>
		<category><![CDATA[what is a database management system]]></category>
		<category><![CDATA[what is a database schema]]></category>
		<category><![CDATA[what is a database software]]></category>
		<category><![CDATA[what is database in computer]]></category>
		<category><![CDATA[What is Database Management?]]></category>
		<category><![CDATA[what is relational database]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4834</guid>

					<description><![CDATA[In computing, database is an organized collection of data stored which is accessed electronically. A database is usually controlled by Data Base Management Systems(DBMS). In a computer data is stored in a structured form which is known as a Database. Database is a collection of data in a organized manner and it can be accessed [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">In computing, database is an organized collection of data stored which is accessed electronically.</li>
<li style="text-align: justify;">A database is usually controlled by Data Base Management Systems(DBMS).</li>
<li style="text-align: justify;">In a computer data is stored in a structured form which is known as a Database.</li>
<li style="text-align: justify;">Database is a collection of data in a organized manner and it can be accessed in several ways.Database contains collection of schemas, tables, queries and views.</li>
<li style="text-align: justify;">Databases help us in storing, accessing and manipulating the data stored in a computer.</li>
<li style="text-align: justify;">The Database Management System allows users to directly communicate with the database.</li>
<li style="text-align: justify;">Small databases can be stored on file system but larger databases need computer clusters or cloud storage.</li>
<li style="text-align: justify;">Database design techniques includes modelling of data, data is stored efficiently, sensitive data is secure and private.</li>
<li style="text-align: justify;">DBMS-Data Base Managment Services is a software that communicates with end users, applications and the database itself to analyse and maintain the data.</li>
</ul>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4835" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-a-database.jpg" alt="" width="700" height="288" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-a-database.jpg 700w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-a-database-300x123.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-a-database-390x160.jpg 390w" sizes="(max-width: 700px) 100vw, 700px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-is-a-database/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is a primary key ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-is-a-primary-key/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-is-a-primary-key/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Sat, 20 Aug 2022 07:55:57 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[define what is a primary key]]></category>
		<category><![CDATA[postgres what is a primary key]]></category>
		<category><![CDATA[primary key example]]></category>
		<category><![CDATA[what is a foreign key]]></category>
		<category><![CDATA[what is a primary key]]></category>
		<category><![CDATA[what is a primary key and explain its characteristics]]></category>
		<category><![CDATA[what is a primary key and foreign key]]></category>
		<category><![CDATA[what is a primary key and foreign key in sql]]></category>
		<category><![CDATA[what is a primary key class]]></category>
		<category><![CDATA[what is a primary key example]]></category>
		<category><![CDATA[what is a primary key explain]]></category>
		<category><![CDATA[what is a primary key in a database]]></category>
		<category><![CDATA[what is a primary key in a relational database]]></category>
		<category><![CDATA[what is a primary key in access]]></category>
		<category><![CDATA[what is a primary key in computer]]></category>
		<category><![CDATA[what is a primary key in dbms]]></category>
		<category><![CDATA[what is a primary key in mysql]]></category>
		<category><![CDATA[what is a primary key in sql]]></category>
		<category><![CDATA[what is a primary key used for in a database]]></category>
		<category><![CDATA[what is primary key and foreign key]]></category>
		<category><![CDATA[what is primary key in ms access]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4831</guid>

					<description><![CDATA[In relational database primary key is a specific choice of minimal set of attributes that uniquely specify a relation. Primary key is a special realational database table column key that uniquely identifies a table record. In a table if primary key needs to be created then we have to define a primary key constraint when [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">In relational database primary key is a specific choice of minimal set of attributes that uniquely specify a relation.</li>
<li style="text-align: justify;">Primary key is a special realational database table column key that uniquely identifies a table record.</li>
<li style="text-align: justify;">In a table if primary key needs to be created then we have to define a primary key constraint when you create or modify a table.</li>
<li style="text-align: justify;">When multiple coulmns are declared as primary key then it is called as Composite key.</li>
<li style="text-align: justify;">A table should not contain more than one primary key.</li>
</ul>
<p style="text-align: justify;">A primary key’s main features are:</p>
<ul style="text-align: justify;">
<li>It must contain a unique value for each row of data. A table can have only one primary key constraint</li>
<li>It cannot contain null values.</li>
<li>Every row must have a primary key value.</li>
<li>It enforces the entity integrity of data.</li>
<li>Primary key always has a unique data.</li>
<li>Primary key length cannot be more than 900 bytes.</li>
<li>Primary key cannot have a null value.</li>
<li>Duplicate values are not allowed in primary key.</li>
<li style="text-align: justify;">A primary key might use one or more fields already present in the table, or a unique field can be created to be the primary key.</li>
</ul>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4832" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/primary-key.png" alt="" width="621" height="501" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/primary-key.png 621w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/primary-key-300x242.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/primary-key-390x315.png 390w" sizes="(max-width: 621px) 100vw, 621px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-is-a-primary-key/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is Normalization in SQL ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-is-normalization-in-sql/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-is-normalization-in-sql/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Sat, 20 Aug 2022 07:27:08 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[normal forms in dbms]]></category>
		<category><![CDATA[normalisation]]></category>
		<category><![CDATA[normalisation in dbms]]></category>
		<category><![CDATA[normalization]]></category>
		<category><![CDATA[normalization example]]></category>
		<category><![CDATA[normalization in dbms]]></category>
		<category><![CDATA[normalization in sql]]></category>
		<category><![CDATA[normalization sql]]></category>
		<category><![CDATA[normalize database]]></category>
		<category><![CDATA[types of normalization]]></category>
		<category><![CDATA[what is database normalization]]></category>
		<category><![CDATA[what is normalization and denormalization]]></category>
		<category><![CDATA[what is normalization in computer]]></category>
		<category><![CDATA[what is normalization in database]]></category>
		<category><![CDATA[what is normalization in dbms]]></category>
		<category><![CDATA[what is normalization in machine learning]]></category>
		<category><![CDATA[what is normalization in python]]></category>
		<category><![CDATA[what is normalization in sql]]></category>
		<category><![CDATA[what is normalization in sql server]]></category>
		<category><![CDATA[what is normalization in statistics]]></category>
		<category><![CDATA[what is normalization of data]]></category>
		<category><![CDATA[what is normalization of deviance]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4827</guid>

					<description><![CDATA[It is a rule where larger tables are divided into smaller tables and they are linked using relationships. Process of organizing data in a data base is called as Normalization.  The purpose of Normalisation is to eliminate repetitive data and ensure that data is stored logically. Normalization minimizes redundency from a relation or relation set. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4829 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/database-normalization-.png" alt="" width="831" height="320" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/database-normalization-.png 831w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/database-normalization--300x116.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/database-normalization--768x296.png 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/database-normalization--390x150.png 390w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/database-normalization--820x316.png 820w" sizes="(max-width: 831px) 100vw, 831px" /></p>
<ul>
<li style="text-align: justify;">It is a rule where larger tables are divided into smaller tables and they are linked using relationships.</li>
<li style="text-align: justify;">Process of organizing data in a data base is called as Normalization.</li>
<li style="text-align: justify;"> The purpose of Normalisation is to eliminate repetitive data and ensure that data is stored logically.</li>
<li>Normalization minimizes redundency from a relation or relation set.</li>
<li>Normalization also helps in minimizing Reuse of data.</li>
<li>Also helps in reduction of insertion, updation and deletion anamolies.</li>
<li>Relation schemas that do not meet the properties are decomposed into small relation schemas so that they can meet the desired properties.</li>
<li>It is a rule where larger tables are divided into smaller tables and they are linked using relationships.</li>
<li>Database table redundancy is reduced by using normal forms.</li>
</ul>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4828 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/normalized-database-example.png" alt="" width="800" height="400" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/normalized-database-example.png 800w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/normalized-database-example-300x150.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/normalized-database-example-768x384.png 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/normalized-database-example-390x195.png 390w" sizes="(max-width: 800px) 100vw, 800px" /></p>
<p style="text-align: justify;">
<p style="text-align: justify;">
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-is-normalization-in-sql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is SQL ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-is-sql/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-is-sql/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Sat, 20 Aug 2022 07:00:04 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[how to learn sql]]></category>
		<category><![CDATA[what is sql *]]></category>
		<category><![CDATA[what is sql * plus]]></category>
		<category><![CDATA[what is sql and mysql]]></category>
		<category><![CDATA[what is sql commands]]></category>
		<category><![CDATA[what is sql database]]></category>
		<category><![CDATA[what is sql developer]]></category>
		<category><![CDATA[what is sql full form]]></category>
		<category><![CDATA[what is sql in dbms]]></category>
		<category><![CDATA[what is sql in excel]]></category>
		<category><![CDATA[what is sql injection]]></category>
		<category><![CDATA[what is sql interview questions]]></category>
		<category><![CDATA[what is sql join]]></category>
		<category><![CDATA[what is sql server]]></category>
		<category><![CDATA[what is sql server management studio]]></category>
		<category><![CDATA[what is sql union]]></category>
		<category><![CDATA[what is sql used for]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4823</guid>

					<description><![CDATA[SQL stands for Structured Query Language. It is used for interacting with databases. SQL is also known as standard query language which is used for maintaining relational database management systems(RDBMS). SQL is a subject specific language which is used for programming and designed for maintaining data. It performs different operations of data manipulation on different [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4824 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/sql.jpeg" alt="sql" width="768" height="564" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/sql.jpeg 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/sql-300x220.jpeg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/sql-390x286.jpeg 390w" sizes="(max-width: 768px) 100vw, 768px" /></p>
<ul style="text-align: justify;">
<li style="text-align: justify;">SQL stands for Structured Query Language. It is used for interacting with databases.</li>
<li>SQL is also known as standard query language which is used for maintaining relational database management systems(RDBMS).</li>
<li>SQL is a subject specific language which is used for programming and designed for maintaining data.</li>
<li>It performs different operations of data manipulation on different types of data using features of SQL.</li>
<li>It is used for creation and deletion of database.</li>
<li>It can also be used to fetch and modify rows and tables in a database.</li>
<li>SQL is specialized language for updating, deleting,and requesting information from databases.</li>
</ul>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4825 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-sql.jpg" alt="" width="568" height="378" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-sql.jpg 568w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-sql-300x200.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-sql-390x260.jpg 390w" sizes="(max-width: 568px) 100vw, 568px" /></p>
<p style="text-align: justify;">
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-is-sql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Lazy writer in Memory ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/lazy-writer-in-memory/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/lazy-writer-in-memory/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sun, 18 Jul 2021 20:31:13 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[Allstate Solut interview questions and answers]]></category>
		<category><![CDATA[Capgemini interview questions and answers]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[CGI Group Inc interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[Collabera Technologies interview questions and answers]]></category>
		<category><![CDATA[Conduent interview questions and answers]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[difference between checkpoint and lazy writer in sql server]]></category>
		<category><![CDATA[FIS Global Business Solutions India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[Genpact interview questions and answers]]></category>
		<category><![CDATA[IBM interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[L&T Infotech interview questions and answers]]></category>
		<category><![CDATA[lazy server]]></category>
		<category><![CDATA[lazy spool sql server 2008]]></category>
		<category><![CDATA[lazy writer in sql server]]></category>
		<category><![CDATA[lazy writer in sql server 2008]]></category>
		<category><![CDATA[lazy writer in sql server 2008 r2]]></category>
		<category><![CDATA[lazy writer in sql server 2012]]></category>
		<category><![CDATA[lazy writing]]></category>
		<category><![CDATA[Mindtree interview questions and answers]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[Persistent Systems interview questions and answers]]></category>
		<category><![CDATA[Prokarma Softech Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[R Systems interview questions and answers]]></category>
		<category><![CDATA[SAP Labs India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[sql lazy writer]]></category>
		<category><![CDATA[sql server lazywriter]]></category>
		<category><![CDATA[Tata Consultancy Service interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[UnitedHealth Group interview questions and answers]]></category>
		<category><![CDATA[ValueLabs interview questions and answers]]></category>
		<category><![CDATA[Virtusa Consulting Services Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Wells Fargo interview questions and answers]]></category>
		<category><![CDATA[what is lazy writer in sql server 2008]]></category>
		<category><![CDATA[Xoriant Solutions Pvt Ltd interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=970</guid>

					<description><![CDATA[Answer : Lazy write is an effect caused by the use of a write-back cache...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="lazy-write" class="color-pink" style="text-align: justify;"><span style="font-family: inherit; font-size: 2rem;">Lazy write</span></h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Lazy write is an effect caused by the use of a write-back <a href="https://forums.wikitechy.com/question/what-is-the-difference-between-cache-and-persist/" target="_blank" rel="noopener">cache</a>. In a write-back cache, data is first written to the cache and then is later (during a particular time such as an idle machine cycle) is written to the disk or memory.</li>
<li>This type of cache is more complex to implement, due to the need to track each locations that have been written over and what needs to be marked as dirty to fix later.</li>
</ul>
</div>
</div>
<div class="text-center row" style="text-align: justify;"></div>
<div class="Content">
<div class="hddn">
<h2 id="lazy-writer-in-memory" class="color-green" style="text-align: justify;">Lazy writer in Memory</h2>
<ul>
<li style="text-align: justify;">Lazy writer is a thread which is present for each NUMA node (and every instance has at least one) that scans through the buffer cache associated with that node.</li>
<li style="text-align: justify;">The lazy writer thread sleeps for a specific interval of time, and when it wakes up, it examines the size of the free buffer list.</li>
<li style="text-align: justify;">If the list is below a certain threshold, which depends on the total size of the buffer pool, the lazy writer thread scans the buffer pool to repopulate the free list.</li>
<li style="text-align: justify;">As buffers are added to the free list, they are also written to disk if they are dirty.</li>
<li style="text-align: justify;">So if there is no memory pressure and memory notification is stable it sleeps</li>
<li style="text-align: justify;">The sole purpose of Lazy Writer is to maintain some free buffers in the <a href="https://www.wikitechy.com/tutorials/sql/subquery-in-sql-server" target="_blank" rel="noopener">SQL Server</a> Buffer Pool.</li>
<li style="text-align: justify;">Lazy writer runs periodically and check which buffers can be flushed and returned to the free pool.</li>
<li style="text-align: justify;">So even SQL Server is not under memory pressure, it will also work regularly.</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/lazy-writer-in-memory/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is the difference between the SubQuery and Corelated SubQuery ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-the-subquery-and-corelated-subquery/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-the-subquery-and-corelated-subquery/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sun, 18 Jul 2021 20:30:02 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[Allstate Solut interview questions and answers]]></category>
		<category><![CDATA[Capgemini interview questions and answers]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[CGI Group Inc interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[Collabera Technologies interview questions and answers]]></category>
		<category><![CDATA[Conduent interview questions and answers]]></category>
		<category><![CDATA[correlated subquery and nested subquery]]></category>
		<category><![CDATA[correlated subquery example]]></category>
		<category><![CDATA[correlated subquery example in oracle]]></category>
		<category><![CDATA[correlated subquery example in sql servernon correlated subquery]]></category>
		<category><![CDATA[correlated subquery in oracle 10g example]]></category>
		<category><![CDATA[correlated subquery in sql server]]></category>
		<category><![CDATA[correlated subquery questions]]></category>
		<category><![CDATA[correlated subquery tutorial]]></category>
		<category><![CDATA[correlated subquery tutorialspoint]]></category>
		<category><![CDATA[correlated subquery vs non correlated subquery]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[difference between subquery and correlated subquery in oracle]]></category>
		<category><![CDATA[example of correlated subquery]]></category>
		<category><![CDATA[FIS Global Business Solutions India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[Genpact interview questions and answers]]></category>
		<category><![CDATA[IBM interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[L&T Infotech interview questions and answers]]></category>
		<category><![CDATA[Mindtree interview questions and answers]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[non correlated subquery example in oracle]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[oracle correlated subquery in from clause]]></category>
		<category><![CDATA[oracle correlated subquery in select clause]]></category>
		<category><![CDATA[Persistent Systems interview questions and answers]]></category>
		<category><![CDATA[Prokarma Softech Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[R Systems interview questions and answers]]></category>
		<category><![CDATA[SAP Labs India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[subquery vs correlated subquery]]></category>
		<category><![CDATA[Tata Consultancy Service interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[UnitedHealth Group interview questions and answers]]></category>
		<category><![CDATA[ValueLabs interview questions and answers]]></category>
		<category><![CDATA[Virtusa Consulting Services Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Wells Fargo interview questions and answers]]></category>
		<category><![CDATA[when to use correlated subquery]]></category>
		<category><![CDATA[xenosoft interview questions and answers]]></category>
		<category><![CDATA[Xoriant Solutions Pvt Ltd interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=969</guid>

					<description><![CDATA[Answer : The inner query is executed only once...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="subquery" class="color-pink" style="text-align: justify;"><span style="font-family: inherit; font-size: 2rem;">Subquery</span></h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>The inner query is executed only once.</li>
<li>The inner query will get executed first and the output of the inner query used by the outer query.</li>
<li>The inner query is not dependent on outer query.</li>
</ul>
</div>
</div>
<div class="CodeContent" style="text-align: justify;">
<div class="hddn">
<figure class="highlight">
<pre><code id="code1" class="hljs" data-lang=""><span class="nt">SELECT Employee_name, dept_no 
FROM Employee 
WHERE Employee_name IN (SELECT Employee_name FROM Customer);</span></code></pre>
</figure>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="correlated-subquery" class="color-blue">Correlated SubQuery</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>The outer query will get executed first and for every row of outer query, inner query will get executed.</li>
<li>So the inner query will get executed as many times as number of rows in result of the outer query.</li>
<li>The outer query output can use the inner query output for comparison. This means inner query and outer query dependent on each other.</li>
</ul>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">SELECT Employee_name,dept_id <br/>FROM Employee<br/>WHERE Employee_name IN (SELECT Employee_name FROM dept WHERE Employee.dept_id=dept.dept_id);</code></pre> </div>
</div>
</div>
<div class="CodeContent" style="text-align: justify;">
<div class="hddn"></div>
</div>
<div class="ImageContent">
<div class="hddn" style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter size-medium" src="https://cdn.wikitechy.com/interview-questions/sql/what-is-the-difference-between-the-subquery-and-corelated-subquery.png" alt="Subquery and Corelated Subquery" width="411" height="140" /></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-the-subquery-and-corelated-subquery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is the Difference between join and union ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-join-and-union/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-join-and-union/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sun, 18 Jul 2021 20:27:46 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[Allstate Solut interview questions and answers]]></category>
		<category><![CDATA[Capgemini interview questions and answers]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[CGI Group Inc interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[Collabera Technologies interview questions and answers]]></category>
		<category><![CDATA[Conduent interview questions and answers]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[difference between cartesian product and union]]></category>
		<category><![CDATA[difference between join and union]]></category>
		<category><![CDATA[difference between join and union with example]]></category>
		<category><![CDATA[difference between or and union in sql]]></category>
		<category><![CDATA[difference between union all and union]]></category>
		<category><![CDATA[difference between union and full outer joinfull outer join vs union all performance]]></category>
		<category><![CDATA[FIS Global Business Solutions India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[full outer join]]></category>
		<category><![CDATA[Genpact interview questions and answers]]></category>
		<category><![CDATA[IBM interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[inner join]]></category>
		<category><![CDATA[join]]></category>
		<category><![CDATA[joins]]></category>
		<category><![CDATA[L&T Infotech interview questions and answers]]></category>
		<category><![CDATA[left join]]></category>
		<category><![CDATA[left outer join]]></category>
		<category><![CDATA[Mindtree interview questions and answers]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[mysql inner join]]></category>
		<category><![CDATA[mysql join]]></category>
		<category><![CDATA[mysql union]]></category>
		<category><![CDATA[mysql union example]]></category>
		<category><![CDATA[mysql union join difference]]></category>
		<category><![CDATA[natural join in sql]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[oracle sql union]]></category>
		<category><![CDATA[outer join]]></category>
		<category><![CDATA[outer join in sql]]></category>
		<category><![CDATA[Persistent Systems interview questions and answers]]></category>
		<category><![CDATA[Prokarma Softech Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[R Systems interview questions and answers]]></category>
		<category><![CDATA[SAP Labs India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[self join in sql]]></category>
		<category><![CDATA[sql full join]]></category>
		<category><![CDATA[sql inner join]]></category>
		<category><![CDATA[sql inner join where]]></category>
		<category><![CDATA[sql join]]></category>
		<category><![CDATA[sql join 3 tables]]></category>
		<category><![CDATA[sql join types]]></category>
		<category><![CDATA[sql left join]]></category>
		<category><![CDATA[sql left outer join]]></category>
		<category><![CDATA[sql multiple joins]]></category>
		<category><![CDATA[sql outer join]]></category>
		<category><![CDATA[sql union]]></category>
		<category><![CDATA[sql union all]]></category>
		<category><![CDATA[sql union all example]]></category>
		<category><![CDATA[sql union distinct]]></category>
		<category><![CDATA[sql union order by]]></category>
		<category><![CDATA[sql union vs join]]></category>
		<category><![CDATA[sql union vs union all]]></category>
		<category><![CDATA[Tata Consultancy Service interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[trade union]]></category>
		<category><![CDATA[union all]]></category>
		<category><![CDATA[union and join together in sql]]></category>
		<category><![CDATA[union in sql server]]></category>
		<category><![CDATA[union vs join performance]]></category>
		<category><![CDATA[unions]]></category>
		<category><![CDATA[UnitedHealth Group interview questions and answers]]></category>
		<category><![CDATA[ValueLabs interview questions and answers]]></category>
		<category><![CDATA[Virtusa Consulting Services Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Wells Fargo interview questions and answers]]></category>
		<category><![CDATA[what is a union]]></category>
		<category><![CDATA[workers union]]></category>
		<category><![CDATA[Xoriant Solutions Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[xt global interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=968</guid>

					<description><![CDATA[Answer : The union operator combines the results of two or more queries into a single result set...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="union" class="color-pink" style="text-align: justify;"><span style="font-family: inherit; font-size: 2rem;">Union</span></h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li style="list-style-type: none;">
<ul>
<li>The union operator combines the results of two or more queries into a single result set. But no.of columns must match in both/all the queries (and also the order) which are used for union.</li>
<li>We can union two tables irrespective of common field.</li>
<li>The UNION set operator is used for combining data from two tables which have columns with the same datatype.
<ul>
<li>Union &#8211; Returns with no duplicate rows.</li>
<li>Union all &#8211; Retruns with duplicate rows (No. of rows returned = No. of rows in Query1 + No. of rows in Query 2).</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="ImageContent">
<div class="hddn"><img loading="lazy" decoding="async" class="alignnone size-medium aligncenter" src="https://cdn.wikitechy.com/interview-questions/sql/union-unionall-except-intersect.jpg" alt="Union unionall except intersect" width="781" height="156" /></div>
</div>
<ul>
<li>We cannot use the union operator within a create view statement.</li>
<li>We cannot use the union operator on text and image columns.</li>
</ul>
</div>
</div>
<div class="ImageContent" style="text-align: justify;">
<div class="hddn"><img loading="lazy" decoding="async" class="alignnone size-medium aligncenter" src="https://cdn.wikitechy.com/interview-questions/sql/union-command-sql.gif" alt="Union in SQL" width="345" height="225" /></div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="syntax" class="color-blue">Syntax</h2>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">SELECT expression1, expression2, ... expression_n<br/>FROM tables<br/>[WHERE conditions]<br/>UNION<br/>SELECT expression1, expression2, ... expression_n<br/>FROM tables<br/>[WHERE conditions];</code></pre> </div>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="join" class="color-blue">Join</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Joins are used to extract information from more than one table based on the related column/coloums (PK and RFK) any no. of rows can be retrived based on matching colums.</li>
<li>We can join two tables by &#8216;join&#8217; if they have common field.</li>
<li>A Join is used for displaying columns with the same or different names from different tables.</li>
<li>Different types of joins are Inner join=equi join=join , <a href="https://www.wikitechy.com/tutorials/sql/outer-join-in-sql">outer join</a> (Right outer join/right join, <a href="https://www.wikitechy.com/tutorials/sql/left-outer-join-in-sql">Left outer join</a> / left join), <a href="https://www.wikitechy.com/tutorials/sql/cross-join">Cross join</a> , and full outer join/outer join.</li>
<li>We can use join operator within a create view statement.</li>
<li>We can use the join operator on text and image columns.</li>
</ul>
</div>
</div>
<div class="ImageContent" style="text-align: justify;">
<div class="hddn"><img loading="lazy" decoding="async" class="alignnone size-medium aligncenter" src="https://cdn.wikitechy.com/interview-questions/sql/cross-join.png" alt="Cross Join" width="341" height="213" /></div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="syntax-2" class="color-blue">Syntax</h2>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">SELECT column-names<br/>FROM table-name1 JOIN table-name2 <br/>ON column-name1 = column-name2<br/>WHERE condition</code></pre> </div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-join-and-union/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is the SQLCode -501 ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-is-the-sqlcode-501/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-is-the-sqlcode-501/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sun, 18 Jul 2021 20:24:32 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[Allstate Solut interview questions and answers]]></category>
		<category><![CDATA[Capgemini interview questions and answers]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[CGI Group Inc interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[Collabera Technologies interview questions and answers]]></category>
		<category><![CDATA[Conduent interview questions and answers]]></category>
		<category><![CDATA[db2 sql code]]></category>
		<category><![CDATA[db2 sql error sqlcode=-805]]></category>
		<category><![CDATA[db2 sql error sqlcode=-904]]></category>
		<category><![CDATA[db2 sqlcode 180]]></category>
		<category><![CDATA[db2 sqlcode=-904]]></category>
		<category><![CDATA[db2 sqlcode=-911]]></category>
		<category><![CDATA[db2 sqlcode=-913]]></category>
		<category><![CDATA[db2 sqlcode=-922]]></category>
		<category><![CDATA[db2 sqlcode=-991]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[FIS Global Business Solutions India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[Genpact interview questions and answers]]></category>
		<category><![CDATA[how to resolve sqlcode]]></category>
		<category><![CDATA[how to resolve sqlcode 911]]></category>
		<category><![CDATA[how to resolve sqlcode in db2]]></category>
		<category><![CDATA[IBM interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[L&T Infotech interview questions and answers]]></category>
		<category><![CDATA[Mindtree interview questions and answers]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[Persistent Systems interview questions and answers]]></category>
		<category><![CDATA[Prokarma Softech Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[R Systems interview questions and answers]]></category>
		<category><![CDATA[SAP Labs India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[sql code 924]]></category>
		<category><![CDATA[sqlcode]]></category>
		<category><![CDATA[sqlcode -204 sqlstate 42704]]></category>
		<category><![CDATA[sqlcode 805]]></category>
		<category><![CDATA[sqlcode 913]]></category>
		<category><![CDATA[sqlcode meaning]]></category>
		<category><![CDATA[sqlcode: -530]]></category>
		<category><![CDATA[sqlcode=-911]]></category>
		<category><![CDATA[sqlerrmc=2sqlcode 911 mainframe]]></category>
		<category><![CDATA[sqlstate: 23503]]></category>
		<category><![CDATA[sqlstate=40001]]></category>
		<category><![CDATA[Tata Consultancy Service interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[UnitedHealth Group interview questions and answers]]></category>
		<category><![CDATA[ValueLabs interview questions and answers]]></category>
		<category><![CDATA[Virtusa Consulting Services Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Wells Fargo interview questions and answers]]></category>
		<category><![CDATA[Xoriant Solutions Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[zeus interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=967</guid>

					<description><![CDATA[Answer : sqlcode -501 pops up to show...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="what-is-the-sqlcode-501" class="color-pink" style="text-align: justify;">What is the SQLcode -501 ?</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>SQLcode -501 pops up to show that , the Cursor identified in fetch or close statement is not opened.</li>
</ul>
</div>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li>SQL error code means it return codes that are preceded by a minus sign (-) indicate that the SQL statement execution was unsuccessful.
<ul>
<li style="text-align: justify;">If SQLCODE = 0, execution was successful.</li>
<li style="text-align: justify;">If SQLCODE &gt; 0, execution was successful with a warning.</li>
<li style="text-align: justify;">If SQLCODE &lt; 0, execution was not successful.</li>
<li style="text-align: justify;">SQLCODE = 100, &#8220;no data&#8221; was found.</li>
</ul>
</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-is-the-sqlcode-501/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is the difference between a HAVING CLAUSE and a WHERE CLAUSE ?</title>
		<link>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-a-having-clause-and-a-where-clause/</link>
					<comments>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-a-having-clause-and-a-where-clause/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sun, 18 Jul 2021 20:21:49 +0000</pubDate>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[Allstate Solut interview questions and answers]]></category>
		<category><![CDATA[Capgemini interview questions and answers]]></category>
		<category><![CDATA[case in where clause]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[CGI Group Inc interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[clause]]></category>
		<category><![CDATA[clause examples]]></category>
		<category><![CDATA[Collabera Technologies interview questions and answers]]></category>
		<category><![CDATA[conditional clauses]]></category>
		<category><![CDATA[Conduent interview questions and answers]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[difference between groupby and orderby in sql]]></category>
		<category><![CDATA[difference between having and group by]]></category>
		<category><![CDATA[difference between where and having clause]]></category>
		<category><![CDATA[difference between where and having clause in oracle]]></category>
		<category><![CDATA[difference between where and having clause in sql server]]></category>
		<category><![CDATA[difference between where and having clause in tabular form]]></category>
		<category><![CDATA[FIS Global Business Solutions India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[Genpact interview questions and answers]]></category>
		<category><![CDATA[group by clause]]></category>
		<category><![CDATA[group by clause in sql]]></category>
		<category><![CDATA[group by sql]]></category>
		<category><![CDATA[having clause]]></category>
		<category><![CDATA[having clause in sql]]></category>
		<category><![CDATA[having clause in sql stackoverflow]]></category>
		<category><![CDATA[having vs where performance]]></category>
		<category><![CDATA[IBM interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[L&T Infotech interview questions and answers]]></category>
		<category><![CDATA[main difference between having and wheremy]]></category>
		<category><![CDATA[Mindtree interview questions and answers]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[mysql in clause]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[oracle with clause]]></category>
		<category><![CDATA[order by clause]]></category>
		<category><![CDATA[order by clause in sql]]></category>
		<category><![CDATA[Persistent Systems interview questions and answers]]></category>
		<category><![CDATA[Prokarma Softech Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[R Systems interview questions and answers]]></category>
		<category><![CDATA[SAP Labs India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[sql case in where clause]]></category>
		<category><![CDATA[sql having count]]></category>
		<category><![CDATA[sql having vs where]]></category>
		<category><![CDATA[sql join]]></category>
		<category><![CDATA[sql where clause]]></category>
		<category><![CDATA[sql with clause]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[Tata Consultancy Service interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[UnitedHealth Group interview questions and answers]]></category>
		<category><![CDATA[ValueLabs interview questions and answers]]></category>
		<category><![CDATA[Virtusa Consulting Services Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Wells Fargo interview questions and answers]]></category>
		<category><![CDATA[what is a clause]]></category>
		<category><![CDATA[where clause]]></category>
		<category><![CDATA[where clause in sql]]></category>
		<category><![CDATA[Xoriant Solutions Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[yardi software interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=966</guid>

					<description><![CDATA[Answer : The HAVING clause sets conditions on the GROUP BY...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="" class="color-pink" style="text-align: justify;"></h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<table class="table-bordered table-striped table table-responsive">
<tbody>
<tr>
<th>Where Clause</th>
<th>Having Clause</th>
</tr>
<tr>
<td class="text-leftalign">WHERE clause can be used with &#8211; Select, Insert, and<br />
Update statements.</td>
<td class="text-leftalign">HAVING clause can only be used with the Select statement.</td>
</tr>
<tr>
<td class="text-leftalign">The WHERE search condition is applied before the<br />
grouping operation occurs.</td>
<td class="text-leftalign">The HAVING search condition is applied after the grouping operation occurs.</td>
</tr>
<tr>
<td class="text-leftalign">Aggregate functions cannot be used in the WHERE clause,<br />
unless it is in a sub query contained in a HAVING clause.</td>
<td class="text-leftalign">Aggregate functions can be used in Having clause.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="example-of-where-and-having-clause" class="color-green">Example of WHERE and HAVING clause</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>We have two tables Wikitechy_Employee and Department. Wikitechy_Employee contains details of employees e.g. id, name, age, salary and department id, while Department contains id and department name.</li>
<li>In order to show, which employee works for which department we need to join two tables on DEPT_ID to get the the department name.</li>
<li>Our requirement is to find how many employees are working in each department and average salary of department.</li>
<li>In order to use WHERE clause, we will only include employees who are earning more than 5000.</li>
<li>Before executing our query which contains WHERE, HAVING, and GROUP BY clause, let see data from Wikitechy_Employee and Department table:</li>
</ul>
</div>
</div>
<div class="text-center row" style="text-align: justify;"></div>
<div class="subheading" style="text-align: justify;">
<h2 id="select-from-wikitechy_employee">SELECT * FROM Wikitechy_Employee;</h2>
<table class="table-bordered table-striped table table-responsive">
<tbody>
<tr>
<th>EMP_ID</th>
<th>EMP_NAME</th>
<th>EMP_AGE</th>
<th>EMP_SALARY</th>
<th>DEPT_ID</th>
</tr>
<tr>
<td class="text-leftalign">1</td>
<td class="text-leftalign">George Orwell</td>
<td class="text-leftalign">23</td>
<td class="text-leftalign">10000</td>
<td class="text-leftalign">1</td>
</tr>
<tr>
<td class="text-leftalign">2</td>
<td class="text-leftalign">J.K. Rowling</td>
<td class="text-leftalign">24</td>
<td class="text-leftalign">7000</td>
<td class="text-leftalign">2</td>
</tr>
<tr>
<td class="text-leftalign">3</td>
<td class="text-leftalign">Kurt Vonnegut</td>
<td class="text-leftalign">25</td>
<td class="text-leftalign">8000</td>
<td class="text-leftalign">3</td>
</tr>
<tr>
<td class="text-leftalign">4</td>
<td class="text-leftalign">Virginia Woolf</td>
<td class="text-leftalign">27</td>
<td class="text-leftalign">6000</td>
<td class="text-leftalign">1</td>
</tr>
<tr>
<td class="text-leftalign">5</td>
<td class="text-leftalign">Ernest Hemingway</td>
<td class="text-leftalign">28</td>
<td class="text-leftalign">5000</td>
<td class="text-leftalign">2</td>
</tr>
</tbody>
</table>
</div>
<div class="subheading" style="text-align: justify;">
<h2 id="select-from-department">SELECT * FROM Department;</h2>
<table class="table-bordered table-striped table table-responsive">
<tbody>
<tr>
<th>DEPT_ID</th>
<th>DEPT_NAME</th>
</tr>
<tr>
<td class="text-leftalign">1</td>
<td class="text-leftalign">Accounting</td>
</tr>
<tr>
<td class="text-leftalign">2</td>
<td class="text-leftalign">Marketing</td>
</tr>
<tr>
<td class="text-leftalign">3</td>
<td class="text-leftalign">Sales</td>
</tr>
</tbody>
</table>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="sample-code" class="color-green">Sample Code</h2>
</div>
</div>
<div class="CodeContent" style="text-align: justify;">
<div class="hddn">
<figure class="highlight"><div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">SELECT d.DEPT_NAME,<br/>count(e.EMP_NAME) as NUM_EMPLOYEE, <br/>avg(e.EMP_SALARY) as AVG_SALARY FROM Employee e,<br/>Department d WHERE e.DEPT_ID=d.DEPT_ID AND EMP_SALARY &gt; 5000 GROUP BY d.DEPT_NAME;</code></pre> </div></figure>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="output" class="color-green">Output</h2>
</div>
</div>
<table class="table-bordered table-striped table table-responsive">
<tbody>
<tr>
<th>DEPT_NAME</th>
<th>NUM_EMPLOYEE AVG_SALARY</th>
<th>AVG_SALARY</th>
</tr>
<tr>
<td class="text-leftalign">Accounting</td>
<td class="text-leftalign">1</td>
<td class="text-leftalign">8000</td>
</tr>
<tr>
<td class="text-leftalign">Marketing</td>
<td class="text-leftalign">1</td>
<td class="text-leftalign">7000</td>
</tr>
<tr>
<td class="text-leftalign">Sales</td>
<td class="text-leftalign">2</td>
<td class="text-leftalign">8000</td>
</tr>
</tbody>
</table>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>From the number of employee (NUM_EMPLOYEE) column you can see that only Vijay who work for Marketing department is not included in result set because his earning 5000.</li>
<li>This example shows that, condition in WHERE clause is used to filter rows before you aggregate them and then HAVING clause comes in picture for final filtering, which is clear from following query, now Marketing department is excluded because it doesn&#8217;t pass condition in HAVING clause i..e AVG_SALARY &gt; 7000</li>
</ul>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="sample-code-2" class="color-green">Sample Code</h2>
</div>
</div>
<div class="CodeContent" style="text-align: justify;">
<div class="hddn">
<figure class="highlight"><div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-sql code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-sql code-embed-code">SELECT d.DEPT_NAME,<br/>count(e.EMP_NAME) as NUM_EMPLOYEE,<br/>avg(e.EMP_SALARY) as AVG_SALARY FROM Employee e,<br/>Department d WHERE e.DEPT_ID=d.DEPT_ID AND EMP_SALARY &gt; 5000 GROUP BY d.DEPT_NAMEHAVING AVG_SALARY &gt; 7000;</code></pre> </div></figure>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="output-2" class="color-green">Output</h2>
</div>
</div>
<table class="table-bordered table-striped table table-responsive">
<tbody>
<tr>
<th>DEPT_NAME</th>
<th>NUM_EMPLOYEE</th>
<th>AVG_SALARY</th>
</tr>
<tr>
<td class="text-leftalign">Accounting</td>
<td class="text-leftalign">1</td>
<td class="text-leftalign">8000</td>
</tr>
<tr>
<td class="text-leftalign">Sales</td>
<td class="text-leftalign">2</td>
<td class="text-leftalign">8000</td>
</tr>
</tbody>
</table>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/sql/what-is-the-difference-between-a-having-clause-and-a-where-clause/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
