<?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>raiseerror &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/raiseerror/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Tue, 21 Jun 2016 19:52:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>SQL Server: Database Developer (T-SQL) Interview Questions and Answers (Day-10)</title>
		<link>https://www.dbrnd.com/2016/06/sql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 21 Jun 2016 19:51:08 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[char]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Database Developer]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[int]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[NVARCHAR]]></category>
		<category><![CDATA[Parameter Sniffing]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[raiseerror]]></category>
		<category><![CDATA[smallint]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[sql_variant]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[throw]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[VARCHAR]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3063</guid>

					<description><![CDATA[What is the difference between Varchar and NVarchar data type? varchar: Variable-length, non-Unicode character data. The database collation determines which code page the data is stored using. nvarchar: Variable-length Unicode character data. Dependent on the database collation for comparisons. Essentially, NVARCHAR is nothing more than a VARCHAR that supports two-byte characters. The most common use [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10%2F&#038;title=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-10%29" data-a2a-url="https://www.dbrnd.com/2016/06/sql-server-database-developer-t-sql-interview-questions-and-answers-msdtc-parameter-sniffing-sql_variant-throw-raiseerror-day-10/" data-a2a-title="SQL Server: Database Developer (T-SQL) Interview Questions and Answers (Day-10)"></a></p><p><strong>What is the difference between Varchar and NVarchar data type?</strong></p>
<blockquote><p>varchar: Variable-length, non-Unicode character data. The database collation determines which code page the data is stored using.</p>
<p>nvarchar: Variable-length Unicode character data. Dependent on the database collation for comparisons.</p>
<p>Essentially, NVARCHAR is nothing more than a VARCHAR that supports two-byte characters. The most common use for this sort of thing is to store character data that is a mixture of English and non-English symbols.</p>
<p>The key difference between the two data types is how they&#8217;re stored.</p></blockquote>
<p><strong>What is the difference between Varchar(max) and TEXT data type?</strong></p>
<blockquote><p>The VARCHAR(MAX) type is a replacement for TEXT. The basic difference is that a TEXT type will always store the data in a blob whereas the VARCHAR(MAX) type will attempt to store the data directly in the row unless it exceeds the 8k limitation and at that point it stores it in a blob.</p>
<p>The legacy types (TEXT, NTEXT, IMAGE) are deprecated and support for them will be dropped in a future version of SQL Server.</p></blockquote>
<p><strong>What is the difference between CHAR and VARCHAR?</strong></p>
<blockquote><p>CHAR Data Type is a Fixed Length Data Type. For example if you declare a variable/column of CHAR (10) data type, then it will always take 10 bytes irrespective of whether you are storing 1 character or 10 character in this variable or column.</p>
<p>On the other hand VARCHAR is a variable length Data Type. For example if you declare a variable/column of VARCHAR (10) data type, it will take the no. of bytes equal to the number of characters stored in this column. So, in this variable/column if you are storing only one character then it will take only one byte and if we are storing 10 characters then it will take 10 bytes.</p></blockquote>
<p><strong>What is the difference between Datetime and Datetime2?</strong></p>
<p>DateTime2 is the new Data Type introduced in SQL Server 2008 for storing Date and Time value. Microsoft Suggests to use this new Data Type instead of DateTime that is mainly available for backwards compatibility.</p>
<p><strong>Min and Max values:</strong></p>
<ul>
<li>DateTime: BETWEEN ‘1753-01-01 00:00:00’ AND ‘’9999-12-31 23:59:59.997’</li>
<li>DateTime2: BETWEEN ‘0001-01-01 00:00:00’ AND ‘9999-12-31 23:59:59.9999999’</li>
</ul>
<p><strong>Storage Size:</strong></p>
<ul>
<li>DateTime: 8 Bytes</li>
<li>DateTime2(n): 6 to 8 bytes</li>
</ul>
<p><strong>Precision:</strong></p>
<ul>
<li>DateTime – only allows for precision up to every 3rd milisecond which essentially means that you can get rounding issues for times that are in fact different. The rounding is to increments of .000, .003, or .007 seconds.</li>
<li>DateTime2(n) – The precision scale is 0 to 7 digits, with an accuracy of 100 nanoseconds . The default precision is 7 digits.</li>
</ul>
<p><strong>What is the difference between HAVING and WHERE Clause?</strong></p>
<ul>
<li>HAVING specifies a search condition for a group or an aggregate function used in SELECT statement.</li>
<li>HAVING can be used only with the SELECT statement. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause.</li>
<li>A query can contain both a WHERE clause and a HAVING clause. The WHERE clause is applied first to the individual rows in the tables . Only the rows that meet the conditions in the WHERE clause are grouped. The HAVING clause, then applied to the rows in the result set. Only the groups that meet the HAVING conditions appear in the query output.</li>
</ul>
<p><strong>What is the difference Between GETDATE and SYSDATETIME?</strong></p>
<p>In case of GETDATE the precision is till miliseconds and in case of SYSDATETIME the precision is till nanoseconds.</p>
<p>&nbsp;</p>
<p><strong>What is the difference between THROW and RAISERROR?</strong></p>
<blockquote><p>When using RAISERROR function, it just returns the last (single) error message and its details, but the previous error message details are not returned by this function.</p>
<p>With the new THROW clause you won’t see any issue of omitting the previous errors. And it returns all error details as thrown by the SQL statement itself.</p></blockquote>
<p><strong>What is bit data type?</strong></p>
<blockquote><p>Bit datatype is used to store boolean information like 1 or 0 (true or false).</p>
<p>Bit datatype can represent a Null state.</p></blockquote>
<p><strong>What is the difference between SMALLINT and TINYINT?</strong></p>
<blockquote><p>The storage of TinyINT is 1 byte and can store range from 0 to 255.</p>
<p>The storage of SmallINT is 2 bytes and can store range from -32768 to 32767.</p></blockquote>
<p><strong>What is the Difference Between Cast and Convert?</strong></p>
<ul>
<li>CAST and CONVERT are both used to convert data from one data type to another.</li>
<li>CAST is part of the ANSI-SQL specification; whereas, CONVERT is not.  In fact, CONVERT is SQL implementation specific.</li>
<li>CONVERT differences lie in that it accepts an optional style parameter which is used for formatting.</li>
<li>For example, when converting a DateTime datatype to Varchar, you can specify the resulting date’s format, such as YYYY/MM/DD or MM/DD/YYYY.</li>
<li>SELECT CONVERT(VARCHAR,GETDATE(),101) as MMDDYYYY, CONVERT(VARCHAR,GETDATE(),111) as YYYYMMDD</li>
</ul>
<p>&nbsp;</p>
<p><strong>Have you ever stored XML type of data into SQL Server?</strong></p>
<blockquote><p>Yes: Using XML Data type, we can store XML formatted data into SQL Server.</p>
<p>XML is a good choice if you want a platform-independent model in order to ensure portability of the data by using structural and semantic markup.</p></blockquote>
<p><strong>What is MSDTC?</strong></p>
<blockquote><p>The Microsoft Distributed Transaction Coordinator is a transaction manager that allows client applications to include several different sources of data in one transaction.</p>
<p>MSDTC coordinates committing the distributed transaction across all the servers enlisted in the transaction.</p></blockquote>
<p><strong>What is Distributed Queries in SQL Server?</strong></p>
<blockquote><p>Distributed query access data from multiple heterogeneous data sources. These data sources can be stored on either the same or different computers. It supports distributed queries by using OLEDB.</p></blockquote>
<p><strong>What is a Two-Phase Commit?</strong></p>
<blockquote><p>In transaction processing, databases, and computer networking, the two-phase commit protocol (2PC) is a type of atomic commitment protocol (ACP). It is a distributed algorithm that coordinates all the processes that participate in a distributed atomic transaction on whether to commit or abort (roll back) the transaction.</p>
<p>Two Phase commit is used in distributed data base systems. This is useful to maintain the integrity of the database so that all the users see the same values. It contains DML statements or Remote Procedural calls that reference a remote object. There are basically 2 phases in a 2 phase commit.</p></blockquote>
<blockquote><p>Prepare Phase : Global coordinator asks participants to prepare</p>
<p>Commit Phase : Commit all participants to coordinator to Prepared, Read only or abort Reply.</p></blockquote>
<p><strong>What do you know about the SQL Server parameter sniffing?</strong></p>
<blockquote class="wp-embedded-content" data-secret="L45xWCklUM"><p><a href="https://www.dbrnd.com/2015/05/sql-server-parameter-sniffing/">SQL Server Parameter Sniffing</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/05/sql-server-parameter-sniffing/embed/#?secret=L45xWCklUM" data-secret="L45xWCklUM" width="600" height="338" title="&#8220;SQL Server Parameter Sniffing&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>How do we recompile a stored procedure at run time?</strong></p>
<blockquote><p>Using WITH RECOMPILE hint option, we can recompile stored procedure at run time.</p></blockquote>
<p><strong>What is a SQL_VARIANT?</strong></p>
<ul>
<li>It is a data type that stores values of various SQL Server-supported data types.</li>
<li>sql_variant can be used in columns, parameters, variables, and the return values of user-defined functions. sql_variant enables these database objects to support values of other data types.</li>
<li>A column of type sql_variant may contain rows of different data types. For example, a column defined as sql_variant can store int, binary, and char values.</li>
<li>sql_variant can have a maximum length of 8016 bytes.</li>
</ul>
<p><strong>What kind of data types which are not supported by SQL_VARIANT?</strong></p>
<ul>
<li>varchar(max)</li>
<li>varbinary(max)</li>
<li>nvarchar(max)</li>
<li>xml</li>
<li>text</li>
<li>ntext</li>
<li>image</li>
<li>rowversion (timestamp)</li>
<li>sql_variant</li>
<li>geography</li>
<li>hierarchyid</li>
<li>geometry</li>
<li>User-defined types</li>
<li>datetimeoffset</li>
</ul>
<p><strong>Would you please explain the logic to split a comma separated values?</strong></p>
<blockquote class="wp-embedded-content" data-secret="x028VWWRz4"><p><a href="https://www.dbrnd.com/2015/12/sql-serverfunction-to-split-string-value-using-different-delimiters/">SQL Server:Function to Split String Value Using Different Delimiters</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/12/sql-serverfunction-to-split-string-value-using-different-delimiters/embed/#?secret=x028VWWRz4" data-secret="x028VWWRz4" width="600" height="338" title="&#8220;SQL Server:Function to Split String Value Using Different Delimiters&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Database Developer (T-SQL) Interview Questions and Answers (Day-6)</title>
		<link>https://www.dbrnd.com/2016/06/sql-server-database-developer-t-sql-interview-questions-and-answers-raise-error-synonyms-bitwise-view-stored-procedure-day-6/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 17 Jun 2016 21:21:55 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[ad-hoc queries]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[bitwise operator]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Database Developer]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[error number]]></category>
		<category><![CDATA[inteview]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[raiseerror]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[stored procedures]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[views]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3048</guid>

					<description><![CDATA[What is should be your standard format to store date and time? ISO standard and format number is 112. (yyyymmdd) [crayon-6a96cb2d98670307735239/] When the error occurred, What kind of data we can retrieved in catch block? ERROR_NUMBER() &#8211; returns the number of the error. ERROR_SEVERITY() &#8211; returns the severity. ERROR_STATE() &#8211; returns the error state number. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-raise-error-synonyms-bitwise-view-stored-procedure-day-6%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-raise-error-synonyms-bitwise-view-stored-procedure-day-6%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-raise-error-synonyms-bitwise-view-stored-procedure-day-6%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-raise-error-synonyms-bitwise-view-stored-procedure-day-6%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-raise-error-synonyms-bitwise-view-stored-procedure-day-6%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-raise-error-synonyms-bitwise-view-stored-procedure-day-6%2F&amp;linkname=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F06%2Fsql-server-database-developer-t-sql-interview-questions-and-answers-raise-error-synonyms-bitwise-view-stored-procedure-day-6%2F&#038;title=SQL%20Server%3A%20Database%20Developer%20%28T-SQL%29%20Interview%20Questions%20and%20Answers%20%28Day-6%29" data-a2a-url="https://www.dbrnd.com/2016/06/sql-server-database-developer-t-sql-interview-questions-and-answers-raise-error-synonyms-bitwise-view-stored-procedure-day-6/" data-a2a-title="SQL Server: Database Developer (T-SQL) Interview Questions and Answers (Day-6)"></a></p><p><strong>What is should be your standard format to store date and time?</strong></p>
<blockquote><p>ISO standard and format number is 112. (yyyymmdd)</p><pre class="crayon-plain-tag">SELECT convert(datetime,'2016-05-26',112);

-- output: 20160526</pre><p>
</p></blockquote>
<p><strong>When the error occurred, What kind of data we can retrieved in catch block?</strong></p>
<ul>
<li>ERROR_NUMBER() &#8211; returns the number of the error.</li>
<li>ERROR_SEVERITY() &#8211; returns the severity.</li>
<li>ERROR_STATE() &#8211; returns the error state number.</li>
<li>ERROR_PROCEDURE() &#8211; returns the name of the stored procedure or trigger where the error occurred.</li>
<li>ERROR_LINE() &#8211; returns the line number inside the routine that caused the error.</li>
<li>ERROR_MESSAGE() &#8211; returns the complete text of the error message.</li>
</ul>
<p><strong>T-SQL scripts and stored procedures don&#8217;t produce their PRINT statements and RAISERROR output in a way that keeps you informed of the code&#8217;s progress. You usually have to wait until the procedure is complete before seeing messages.  How can I get insight into the code&#8217;s progress?</strong></p>
<blockquote><p>The solution is to use the WITH NOWAIT clause of the RAISERROR statement.  It may be surprising but using RAISERROR doesn&#8217;t require that there is an error condition.  If the severity level given to RAISERROR is 0 through 10 SQL Server treats the RAISERROR as a plain message and not an error at all.</p><pre class="crayon-plain-tag">RAISERROR ('Code block 3: query is running', 0, 1) WITH NOWAIT;</pre><p>
</p></blockquote>
<p><strong>What do synonyms do and when could you make the case for using them?</strong></p>
<blockquote><p>Think of this as an alias and Synonyms provide a great layer of abstraction, allowing us to use friendly and/or local names for verbosely named or remote tables, views, procedures and functions.</p>
<p>In some enterprise systems, you may have to deal with remote objects over which you have no control. For example, a database that is maintained by another department or team.</p>
<p>Synonyms can help you decouple the name and location of the underlying object from your SQL code. That way you can code against a synonym table even if the table you want is moved to a new server/database or renamed.</p></blockquote>
<p><strong>How you can execute T-SQL batch multiple times?</strong></p>
<blockquote><p>Using GO command, we can execute T-SQL batch multiple times. We have to specify GO &lt;integer number for loop&gt;.</p></blockquote>
<p><strong>What is the use of BITWISE operators?</strong></p>
<blockquote><p>Bitwise operators can be used to store a complex set of criteria as a single value as opposed to having numerous lookup tables or numerous columns used as a &#8216;flag&#8217; or condition indicator.</p></blockquote>
<p><strong>What do you know about view in SQL Server?</strong></p>
<blockquote><p>A view is a virtual table whose contents are defined by a query and  stored SELECT statement that works like a virtual table. Like a table, a view consists of a set of named columns and rows of data. Unless indexed, a view does not exist as a stored set of data values in a database.</p></blockquote>
<p><strong>What is a Indexed view?</strong></p>
<blockquote><p>An indexed view is a view that has been materialized. This means the view definition has been computed and the resulting data stored just like a table. You index a view by creating a unique clustered index on it. Indexed views can dramatically improve the performance of some types of queries. Indexed views work best for queries that aggregate many rows. They are not well-suited for underlying data sets that are frequently updated.</p></blockquote>
<p><strong>What is Partitioned view?</strong></p>
<blockquote><p>A partitioned view joins horizontally partitioned data from a set of member tables across one or more servers. This makes the data appear as if from one table. A view that joins member tables on the same instance of SQL Server is a local partitioned view.</p></blockquote>
<p><strong>How many columns a view can contain?</strong></p>
<blockquote><p>1024 columns.</p></blockquote>
<p><strong>Can you create a view by using another view?</strong></p>
<blockquote><p>Yes, you can build a view on another view and nest them up to 32 levels.</p></blockquote>
<p><strong>What is System view?</strong></p>
<blockquote><p>System views expose catalog metadata. You can use system views to return information about the instance of SQL Server or the objects defined in the instance, like different Dynamic Management View.</p></blockquote>
<p><strong>What are the benefits of stored procedures?</strong></p>
<ul>
<li>Reduced server/client network traffic</li>
<li>Stronger security</li>
<li>Reuse of code</li>
<li>Easier maintenance</li>
<li>Improved performance</li>
</ul>
<p><strong>Do you know, why stored procedure is better than Ad hoc SQL?</strong></p>
<blockquote class="wp-embedded-content" data-secret="HVrECPAvit"><p><a href="https://www.dbrnd.com/2015/12/database-design-use-stored-procedure-do-not-use-inline-or-ad-hoc-sql/">Database Design: Use Stored Procedure, Do not use Inline or Ad Hoc SQL</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/12/database-design-use-stored-procedure-do-not-use-inline-or-ad-hoc-sql/embed/#?secret=HVrECPAvit" data-secret="HVrECPAvit" width="600" height="338" title="&#8220;Database Design: Use Stored Procedure, Do not use Inline or Ad Hoc SQL&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What is the difference between Stored Procedure and Function in SQL Server?</strong></p>
<ul>
<li>Function must return a value but in Stored Procedure it is optional( Procedure can return zero or n values).</li>
<li>Functions can have only input parameters for it whereas Procedures can have input/output parameters .</li>
<li>Functions can be called from Procedure whereas Procedures cannot be called from Function.</li>
<li>Procedure allows SELECT as well as DML(INSERT/UPDATE/DELETE) statement in it whereas Function allows only SELECT statement in it.</li>
<li>Procedures can not be utilized in a SELECT statement whereas Function can be embedded in a SELECT statement.</li>
<li>Stored Procedures cannot be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section whereas Function can be.</li>
<li>Functions that return tables can be treated as another rowset. This can be used in JOINs with other tables.</li>
<li>Inline Function can be though of as views that take parameters and can be used in JOINs and other Rowset operations.</li>
<li>Exception can be handled by try-catch block in a Procedure whereas try-catch block cannot be used in a Function.</li>
<li>We can go for Transaction Management in Procedure whereas we can&#8217;t go in Function.</li>
</ul>
<p><strong>What is the File table concept of SQL Server 2012?</strong></p>
<blockquote><p>The FileTable feature brings support for the Windows file namespace and compatibility with Windows applications to the file data stored in SQL Server. FileTable lets an application integrate its storage and data management components, and provides integrated SQL Server services &#8211; including full-text search and semantic search &#8211; over unstructured data and metadata.</p>
<p>In other words, you can store files and documents in special tables in SQL Server called FileTables, but access them from Windows applications as if they were stored in the file system, without making any changes to your client applications.</p></blockquote>
<p><strong>How to Convert Varbinary to Numeric &amp; vice versa?</strong></p>
<blockquote class="wp-embedded-content" data-secret="k8lNkVg1Ld"><p><a href="https://www.dbrnd.com/2015/12/sql-server-how-to-convert-varbinary-to-numeric-vice-versa/">SQL Server: How to Convert Varbinary to Numeric &#038; vice versa?</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/12/sql-server-how-to-convert-varbinary-to-numeric-vice-versa/embed/#?secret=k8lNkVg1Ld" data-secret="k8lNkVg1Ld" width="600" height="338" title="&#8220;SQL Server: How to Convert Varbinary to Numeric &#038; vice versa?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What do you know about the new logical function IIF of SQL Server 2012?</strong></p>
<blockquote class="wp-embedded-content" data-secret="9QtBUml9De"><p><a href="https://www.dbrnd.com/2015/12/sql-server-2012-introduce-new-logical-fuction-iif/">SQL Server: 2012 Introduce New Logical Function &#8211; IIF</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/12/sql-server-2012-introduce-new-logical-fuction-iif/embed/#?secret=9QtBUml9De" data-secret="9QtBUml9De" width="600" height="338" title="&#8220;SQL Server: 2012 Introduce New Logical Function &#8211; IIF&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>How to insert different Symbol or Multilingual data in a Table?</strong></p>
<blockquote class="wp-embedded-content" data-secret="5vSiaiYZKK"><p><a href="https://www.dbrnd.com/2016/01/sql-server-insert-different-symbol-or-multilingual-data-in-a-table/">SQL Server: Insert different Symbol or Multilingual data in a Table</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/01/sql-server-insert-different-symbol-or-multilingual-data-in-a-table/embed/#?secret=5vSiaiYZKK" data-secret="5vSiaiYZKK" width="600" height="338" title="&#8220;SQL Server: Insert different Symbol or Multilingual data in a Table&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
