<?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>views &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/views/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>Mon, 24 Jun 2019 19:42:10 +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: How to compare your objects between two Databases</title>
		<link>https://www.dbrnd.com/2019/08/sql-server-how-to-compare-your-objects-table-view-stored-procedure-trigger-constraint-between-two-databases/</link>
					<comments>https://www.dbrnd.com/2019/08/sql-server-how-to-compare-your-objects-table-view-stored-procedure-trigger-constraint-between-two-databases/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 05 Aug 2019 16:16:04 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[compare]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[foreign key]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[Primary key]]></category>
		<category><![CDATA[SQL Query]]></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[tables]]></category>
		<category><![CDATA[trigger]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[views]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4094</guid>

					<description><![CDATA[When we are working with different versions of database, database professionals are comparing the objects between databases of SQL Server. They must make sure about that all databases are in sync. Using this T-SQL Script, you can compare two databases and find a list of unmatched objects like: Constraints, Tables, Views, Stored Procedure, Triggers. Sample [&#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%2F2019%2F08%2Fsql-server-how-to-compare-your-objects-table-view-stored-procedure-trigger-constraint-between-two-databases%2F&amp;linkname=SQL%20Server%3A%20How%20to%20compare%20your%20objects%20between%20two%20Databases" 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%2F2019%2F08%2Fsql-server-how-to-compare-your-objects-table-view-stored-procedure-trigger-constraint-between-two-databases%2F&amp;linkname=SQL%20Server%3A%20How%20to%20compare%20your%20objects%20between%20two%20Databases" 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%2F2019%2F08%2Fsql-server-how-to-compare-your-objects-table-view-stored-procedure-trigger-constraint-between-two-databases%2F&amp;linkname=SQL%20Server%3A%20How%20to%20compare%20your%20objects%20between%20two%20Databases" 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%2F2019%2F08%2Fsql-server-how-to-compare-your-objects-table-view-stored-procedure-trigger-constraint-between-two-databases%2F&amp;linkname=SQL%20Server%3A%20How%20to%20compare%20your%20objects%20between%20two%20Databases" 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%2F2019%2F08%2Fsql-server-how-to-compare-your-objects-table-view-stored-procedure-trigger-constraint-between-two-databases%2F&amp;linkname=SQL%20Server%3A%20How%20to%20compare%20your%20objects%20between%20two%20Databases" 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%2F2019%2F08%2Fsql-server-how-to-compare-your-objects-table-view-stored-procedure-trigger-constraint-between-two-databases%2F&amp;linkname=SQL%20Server%3A%20How%20to%20compare%20your%20objects%20between%20two%20Databases" 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%2F2019%2F08%2Fsql-server-how-to-compare-your-objects-table-view-stored-procedure-trigger-constraint-between-two-databases%2F&#038;title=SQL%20Server%3A%20How%20to%20compare%20your%20objects%20between%20two%20Databases" data-a2a-url="https://www.dbrnd.com/2019/08/sql-server-how-to-compare-your-objects-table-view-stored-procedure-trigger-constraint-between-two-databases/" data-a2a-title="SQL Server: How to compare your objects between two Databases"></a></p><p>When we are working with different versions of database, database professionals are comparing the objects between databases of SQL Server.<br />
They must make sure about that all databases are in sync. </p>
<blockquote><p>Using this T-SQL Script, you can compare two databases and find a list of unmatched objects like: Constraints, Tables, Views, Stored Procedure, Triggers. </p></blockquote>
<p><strong>Sample demonstration:</strong><br />
<strong>First, Create two sample databases:<br />
</strong></p>
<pre class="crayon-plain-tag">CREATE DATABASE ABC
GO
CREATE DATABASE XYZ
GO</pre> </p>
<p><strong>Create few sample tables in both the databases:<br />
</strong></p><pre class="crayon-plain-tag">CREATE TABLE ABC.dbo.tbl_Test
(
	ID INT
	,MyDate DATE
)
GO

CREATE TABLE ABC.dbo.tbl_MyTest
(
	ID INT
	,Name VARCHAR(50)
)
GO

CREATE TABLE XYZ.dbo.tbl_Test
(
	ID INT
	,MyDate DATE
)
GO

CREATE TABLE XYZ.dbo.tbl_MyFinal
(
	ID INT
	,Name VARCHAR(50)
)
GO</pre><p> </p>
<p><strong>T-SQL Script to compare objects between two databases:</strong><br />
According to your databases, You can change the name of @SourceDatabase and @DestinationDatabase.</p>
<pre class="crayon-plain-tag">DECLARE @SourceDatabase VARCHAR(50) 
DECLARE @DestinationDatabase VARCHAR(50) 
DECLARE @SQL VARCHAR(MAX) 
     
SELECT @SourceDatabase = 'ABC' 
SELECT @DestinationDatabase = 'XYZ'
     
SELECT @SQL = 
'
	SELECT 
		ISNULL(S.name,D.name) ObjectName
		,CASE  
			WHEN S.object_id IS NULL 
				THEN D.type_desc + '' is missing in the Source Database: '	+ @SourceDatabase + ''' 
			WHEN D.object_id IS NULL 
				THEN S.type_desc +  '' is missing in the Destination Database: ' + @DestinationDatabase + ''' 
		END ''Status'' 
	FROM 
	(
		SELECT * FROM ' + @SourceDatabase + '.SYS.objects  
		WHERE Type_desc not in (''INTERNAL_TABLE'',''SYSTEM_TABLE'',''SERVICE_QUEUE'')
	) AS S  
	FULL OUTER JOIN 
	(
		SELECT * FROM ' + @DestinationDatabase + '.SYS.objects  
		WHERE Type_desc not in (''INTERNAL_TABLE'',''SYSTEM_TABLE'',''SERVICE_QUEUE'')
	) AS D 
	ON S.name = D.name 
		AND S.type = D.type 
	ORDER BY isnull(S.type,D.type)
'  
EXEC (@Sql)</pre> </p>
<p><strong>The Result:</strong></p>
<pre class="crayon-plain-tag">ObjectName                         Status
------------------  -------------------------------------------------------
tbl_Test              NULL
tbl_MyFinal           USER_TABLE is missing in the Source Database: ABC
tbl_MyTest            USER_TABLE is missing in the Destination Database: XYZ</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2019/08/sql-server-how-to-compare-your-objects-table-view-stored-procedure-trigger-constraint-between-two-databases/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server 2016: SSMS supports Edit TOP 200 Rows for View</title>
		<link>https://www.dbrnd.com/2017/04/sql-server-2016-ssms-supports-edit-top-200-rows-for-view/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 13 Apr 2017 16:16:24 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[SSMS]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[views]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5022</guid>

					<description><![CDATA[SQL Server 2016 has a fixed of SSMS crashed error on Edit 200 Rows for Views. Previously, when you were trying to Edit 200 Rows for Views, SSMS was crashing. With the new SQL Server Management Studio, it is not crashing now. But you cannot update all types of views; you can Edit 200 Rows [&#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%2F2017%2F04%2Fsql-server-2016-ssms-supports-edit-top-200-rows-for-view%2F&amp;linkname=SQL%20Server%202016%3A%20SSMS%20supports%20Edit%20TOP%20200%20Rows%20for%20View" 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%2F2017%2F04%2Fsql-server-2016-ssms-supports-edit-top-200-rows-for-view%2F&amp;linkname=SQL%20Server%202016%3A%20SSMS%20supports%20Edit%20TOP%20200%20Rows%20for%20View" 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%2F2017%2F04%2Fsql-server-2016-ssms-supports-edit-top-200-rows-for-view%2F&amp;linkname=SQL%20Server%202016%3A%20SSMS%20supports%20Edit%20TOP%20200%20Rows%20for%20View" 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%2F2017%2F04%2Fsql-server-2016-ssms-supports-edit-top-200-rows-for-view%2F&amp;linkname=SQL%20Server%202016%3A%20SSMS%20supports%20Edit%20TOP%20200%20Rows%20for%20View" 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%2F2017%2F04%2Fsql-server-2016-ssms-supports-edit-top-200-rows-for-view%2F&amp;linkname=SQL%20Server%202016%3A%20SSMS%20supports%20Edit%20TOP%20200%20Rows%20for%20View" 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%2F2017%2F04%2Fsql-server-2016-ssms-supports-edit-top-200-rows-for-view%2F&amp;linkname=SQL%20Server%202016%3A%20SSMS%20supports%20Edit%20TOP%20200%20Rows%20for%20View" 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%2F2017%2F04%2Fsql-server-2016-ssms-supports-edit-top-200-rows-for-view%2F&#038;title=SQL%20Server%202016%3A%20SSMS%20supports%20Edit%20TOP%20200%20Rows%20for%20View" data-a2a-url="https://www.dbrnd.com/2017/04/sql-server-2016-ssms-supports-edit-top-200-rows-for-view/" data-a2a-title="SQL Server 2016: SSMS supports Edit TOP 200 Rows for View"></a></p><p>SQL Server 2016 has a fixed of SSMS crashed error on Edit 200 Rows for Views. Previously, when you were trying to Edit 200 Rows for Views, SSMS was crashing.</p>
<p>With the new SQL Server Management Studio, it is not crashing now. But you cannot update all types of views; you can Edit 200 Rows for those views which are updatable.</p>
<p>If you are trying to update view which is not updatable, you will get a below error message window, but SSMS is not crashing now which is a good thing.</p>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-5024 size-full" title="SQL ServerS SMS View Error" src="https://www.dbrnd.com/wp-content/uploads/2017/04/SQLServerSSMSViewError.png" alt="SQL ServerS SMS View Error" width="490" height="271" srcset="https://www.dbrnd.com/wp-content/uploads/2017/04/SQLServerSSMSViewError.png 490w, https://www.dbrnd.com/wp-content/uploads/2017/04/SQLServerSSMSViewError-300x166.png 300w, https://www.dbrnd.com/wp-content/uploads/2017/04/SQLServerSSMSViewError-150x83.png 150w" sizes="(max-width: 490px) 100vw, 490px" /></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-6a8fb9e679b8d851261349/] 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 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>
