<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4111577523011141580</id><updated>2026-08-04T01:15:23.998-07:00</updated><category term="SQL"/><category term="ASP.NET"/><category term="Clustered Index"/><category term="Index"/><category term="c# code"/><category term="CDN"/><category term="Dictionary class c#"/><category term="Java Script function"/><category term="Java Script function with  c#"/><category term="NPM"/><category term="Non Clustered Index"/><category term="Primary Key"/><category term="Publish your package on NPM - node package manager"/><category term="RSS"/><category term="ScriptResourceMapping"/><category term="UnobtrusiveValidationMode"/><category term="VS 2008"/><category term="WCF TOOL"/><category term="ajax tool"/><category term="c#"/><category term="c# code for date binding"/><category term="c# code with dropdownlist"/><category term="c# file dowmload"/><category term="delete file by code"/><category term="dependency management tools"/><category term="field set with aspx"/><category term="file download code"/><category term="grid"/><category term="hacking website"/><category term="keys in the dictionary c#"/><category term="modal dialog box"/><category term="model dialog box"/><category term="paging code with c#"/><category term="paging in dataset"/><category term="paging with sql"/><category term="popup window"/><category term="scheduler code"/><category term="seo on page"/><category term="seo with C#"/><category term="sql injection"/><category term="values in the dictionary c#"/><category term="window services"/><title type='text'>ASK DOT NET</title><subtitle type='html'>asp.net   c#  sql 2008   </subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>nitu singh</name><uri>http://www.blogger.com/profile/03242593629717202252</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>243</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-4713476550744597584</id><published>2021-12-12T20:39:00.000-08:00</published><updated>2021-12-12T20:39:06.445-08:00</updated><title type='text'>PIVOT Query for Dynamic format (Dynamic)</title><content type='html'>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh7xLLpexHRNdQcTuPfNjxPZWWyJeMo4czlwiP2mDBxjR42zWT7J90ImGBQtV459cR6iNB9fLYPAAr9FEi8Sc-FiQ_k5HgQRZE5YHncnMH9qv6k7cUD7699YtA3N2lfZ32gG8bYf8VwCZroD4KdlVjVBHjPPjX3owoKAgZ7W42IgwfEuRJfqJVTJClJ=s178&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;132&quot; data-original-width=&quot;178&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh7xLLpexHRNdQcTuPfNjxPZWWyJeMo4czlwiP2mDBxjR42zWT7J90ImGBQtV459cR6iNB9fLYPAAr9FEi8Sc-FiQ_k5HgQRZE5YHncnMH9qv6k7cUD7699YtA3N2lfZ32gG8bYf8VwCZroD4KdlVjVBHjPPjX3owoKAgZ7W42IgwfEuRJfqJVTJClJ=w320-h238&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;create table tbl_Dummy(ID int identity, ROWID int,VALUE nvarchar(100))&lt;/p&gt;&lt;p&gt;insert tbl_Dummy values(1,&#39;+&#39;)&lt;/p&gt;&lt;p&gt;insert tbl_Dummy values(2,&#39;IDIB000F508&#39;)&lt;/p&gt;&lt;p&gt;insert tbl_Dummy values(3,&#39;IDIB&#39;)&lt;/p&gt;&lt;p&gt;insert tbl_Dummy values(4,&#39;00F508&#39;)&lt;/p&gt;&lt;p&gt;insert tbl_Dummy values(5,&#39;INDIABANK&#39;)&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;insert tbl_Dummy values(6,&#39;FARRUKHABAD&#39;)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;declare @cols nvarchar(max),@query nvarchar(max);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;select @cols=STUFF((select &#39;,&#39;+QUOTENAME([ROWID]) from tbl_Dummy for XML PATH(&#39;&#39;)),1,1,&#39;&#39;)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;print @cols&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;select @query=&#39;select * from (select ROWID,VALUE from tbl_Dummy)as s PIVOT(MAX(VALUE) FOR [ROWID] IN (&#39;+@cols+&#39;)) AS pvt&#39;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;EXEC SP_EXECUTESQL @query&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;OUTPUT :&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi5O_zIZX1PYDyEaYTlj79sbVnpJyhlNBs6MZCfsKVVhEqYCpqk2MamHPyLWUPtLqDrxpT4sPXw2b61Czvib-glAn8X8_u6qPuzE1dGc5zZjBQFH7HxhemV5I3yyRoCZJyMmBeZNpz0EZ_zwnj5OoX7uwFo2VLfmv_qEus-1gyhrthaElG3lrJg9zsm=s367&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;44&quot; data-original-width=&quot;367&quot; height=&quot;48&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi5O_zIZX1PYDyEaYTlj79sbVnpJyhlNBs6MZCfsKVVhEqYCpqk2MamHPyLWUPtLqDrxpT4sPXw2b61Czvib-glAn8X8_u6qPuzE1dGc5zZjBQFH7HxhemV5I3yyRoCZJyMmBeZNpz0EZ_zwnj5OoX7uwFo2VLfmv_qEus-1gyhrthaElG3lrJg9zsm=w400-h48&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/4713476550744597584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/4713476550744597584' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/4713476550744597584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/4713476550744597584'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2021/12/pivot-query-for-dynamic-format-dynamic.html' title='PIVOT Query for Dynamic format (Dynamic)'/><author><name>Chandra Prakash Yadav</name><uri>http://www.blogger.com/profile/04854500385641870115</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvKn8PBBZMdkbB0CojxEWI-RBY8MAUhtpijs-VwwlmU3s-6u2VVI-ryp3P9Grt7GelMOCNwhBzzxeO7KRbEZ4D9rof3Y662ZO0lUE0Ii6uhfxo5hDNJsvTSZilW0C0k2o/s113/CP.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEh7xLLpexHRNdQcTuPfNjxPZWWyJeMo4czlwiP2mDBxjR42zWT7J90ImGBQtV459cR6iNB9fLYPAAr9FEi8Sc-FiQ_k5HgQRZE5YHncnMH9qv6k7cUD7699YtA3N2lfZ32gG8bYf8VwCZroD4KdlVjVBHjPPjX3owoKAgZ7W42IgwfEuRJfqJVTJClJ=s72-w320-h238-c" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-3254202163282104680</id><published>2021-12-11T05:49:00.004-08:00</published><updated>2021-12-11T05:49:43.391-08:00</updated><title type='text'>PIVOT Query for static format (value int)</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHo0RXM1B8sQ3e9-IeYJ5UrahUcwp4nkuE00tomWpcHWhHJmHZ5d1cIGSGRrdKBvNJOL8X6ta2zEFeVA_LMStwr5pN6ocp9XNFkX3XJWVzA6gLgOUvF_3x7-D7CAS3Eq8NuErNa4XmWOo/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;135&quot; data-original-width=&quot;89&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHo0RXM1B8sQ3e9-IeYJ5UrahUcwp4nkuE00tomWpcHWhHJmHZ5d1cIGSGRrdKBvNJOL8X6ta2zEFeVA_LMStwr5pN6ocp9XNFkX3XJWVzA6gLgOUvF_3x7-D7CAS3Eq8NuErNa4XmWOo/&quot; width=&quot;158&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;--create table tbl_invoice(ID int identity, ROWID int,Amount int)&lt;/p&gt;&lt;p&gt;--insert tbl_invoice values(1,100)&lt;/p&gt;&lt;p&gt;--insert tbl_invoice values(2,300)&lt;/p&gt;&lt;p&gt;--insert tbl_invoice values(3,345)&lt;/p&gt;&lt;p&gt;--insert tbl_invoice values(4,11)&lt;/p&gt;&lt;p&gt;--insert tbl_invoice values(5,567)&lt;/p&gt;&lt;p&gt;--insert tbl_invoice values(6,543)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;select * from (select id,Amount from tbl_invoice)as s PIVOT(SUM(Amount) FOR [id] IN ([1], [2],[3],[4],[5],[6]))AS pvt&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;OUTPUT :&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSMhqTbT9w_sZO600f81Gs3byj7BsITlxwjDYVb2LyIPRWg1xPkow_-qJ_bTBxLjxI5pLY71Um7ldC9WlikhgScwQzi2In3RKzK3nrnSYmfO6pq5kqBgxQpfsCAp9Hi93OuM7ikhhRgKs/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;53&quot; data-original-width=&quot;207&quot; height=&quot;82&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSMhqTbT9w_sZO600f81Gs3byj7BsITlxwjDYVb2LyIPRWg1xPkow_-qJ_bTBxLjxI5pLY71Um7ldC9WlikhgScwQzi2In3RKzK3nrnSYmfO6pq5kqBgxQpfsCAp9Hi93OuM7ikhhRgKs/&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/3254202163282104680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/3254202163282104680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/3254202163282104680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/3254202163282104680'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2021/12/pivot-query-for-static-format-value-int.html' title='PIVOT Query for static format (value int)'/><author><name>Chandra Prakash Yadav</name><uri>http://www.blogger.com/profile/04854500385641870115</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvKn8PBBZMdkbB0CojxEWI-RBY8MAUhtpijs-VwwlmU3s-6u2VVI-ryp3P9Grt7GelMOCNwhBzzxeO7KRbEZ4D9rof3Y662ZO0lUE0Ii6uhfxo5hDNJsvTSZilW0C0k2o/s113/CP.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHo0RXM1B8sQ3e9-IeYJ5UrahUcwp4nkuE00tomWpcHWhHJmHZ5d1cIGSGRrdKBvNJOL8X6ta2zEFeVA_LMStwr5pN6ocp9XNFkX3XJWVzA6gLgOUvF_3x7-D7CAS3Eq8NuErNa4XmWOo/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-8557817134759900705</id><published>2021-12-11T05:46:00.001-08:00</published><updated>2021-12-11T05:46:35.612-08:00</updated><title type='text'>PIVOT Query for static format (value varchar)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGcLq04VP5gb3Ro4QUdHuvKQbPEAti9vhYc3Fl_PmSCHbBe0lKu1IlLwikBAS6ojdO17uxXZfQJd-bxJkWwcxJDFOTdxE95r6wPce8Ug-AF64NccMa5ruPXiVV98HhfksQiBOrfeJwBJE/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;134&quot; data-original-width=&quot;189&quot; height=&quot;227&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGcLq04VP5gb3Ro4QUdHuvKQbPEAti9vhYc3Fl_PmSCHbBe0lKu1IlLwikBAS6ojdO17uxXZfQJd-bxJkWwcxJDFOTdxE95r6wPce8Ug-AF64NccMa5ruPXiVV98HhfksQiBOrfeJwBJE/&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;--create table tbl_Dummy(ID int identity, ROWID int,VALUE nvarchar(100))&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;--insert tbl_Dummy values(1,&#39;+&#39;)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;--insert tbl_Dummy values(2,&#39;IDIB000F508&#39;)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;--insert tbl_Dummy values(3,&#39;IDIB&#39;)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;--insert tbl_Dummy values(4,&#39;00F508&#39;)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;--insert tbl_Dummy values(5,&#39;INDIABANK&#39;)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;--insert tbl_Dummy values(6,&#39;FARRUKHABAD&#39;)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;select *&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;from (select ROWID,VALUE from tbl_Dummy)as s PIVOT(MAX(VALUE) FOR [ROWID] IN ([1], [2],[3],[4],[5],[6]))AS pvt&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;OUTPUT :&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK35kxlok1va3w3DHUijI9s3ciEltJleq1pMyAVU-Hq-Cp8n4c8OXKvcyeEqr_LuNyV-0vI-zq8vz_3_xkBX9sZj2fo2T3581BzPulAeOInpwZ7y44HgTCrSqtqmpjHu2787jwTuxLDuM/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img data-original-height=&quot;47&quot; data-original-width=&quot;397&quot; height=&quot;48&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK35kxlok1va3w3DHUijI9s3ciEltJleq1pMyAVU-Hq-Cp8n4c8OXKvcyeEqr_LuNyV-0vI-zq8vz_3_xkBX9sZj2fo2T3581BzPulAeOInpwZ7y44HgTCrSqtqmpjHu2787jwTuxLDuM/w400-h48/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/8557817134759900705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/8557817134759900705' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8557817134759900705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8557817134759900705'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2021/12/pivot-query-for-static-format-value.html' title='PIVOT Query for static format (value varchar)'/><author><name>Chandra Prakash Yadav</name><uri>http://www.blogger.com/profile/04854500385641870115</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvKn8PBBZMdkbB0CojxEWI-RBY8MAUhtpijs-VwwlmU3s-6u2VVI-ryp3P9Grt7GelMOCNwhBzzxeO7KRbEZ4D9rof3Y662ZO0lUE0Ii6uhfxo5hDNJsvTSZilW0C0k2o/s113/CP.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGcLq04VP5gb3Ro4QUdHuvKQbPEAti9vhYc3Fl_PmSCHbBe0lKu1IlLwikBAS6ojdO17uxXZfQJd-bxJkWwcxJDFOTdxE95r6wPce8Ug-AF64NccMa5ruPXiVV98HhfksQiBOrfeJwBJE/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-599605579117474380</id><published>2019-08-18T10:23:00.001-07:00</published><updated>2019-08-18T10:48:40.918-07:00</updated><title type='text'>User Control and Custom Control Asp.net</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
User Control is a Container contain various Server Control and these control&amp;nbsp; use web page using drag and drop&amp;nbsp; extension is ascx&lt;br /&gt;
&lt;br /&gt;
User Control&amp;nbsp; can create&amp;nbsp; individual assembly&amp;nbsp; but Custom Control create DLL and add VS tool box&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/599605579117474380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/599605579117474380' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/599605579117474380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/599605579117474380'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/08/user-control-and-custom-control-aspnet.html' title='User Control and Custom Control Asp.net'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-7156214799567786692</id><published>2019-08-05T22:54:00.002-07:00</published><updated>2019-08-06T05:13:45.357-07:00</updated><title type='text'>Routing in MVC 4 and 5</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&amp;nbsp;Routing&amp;nbsp; is a pattern matching system&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Routing maps incoming request (from browser) to a particular resource(controller and action&amp;nbsp; &amp;nbsp;Method)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&amp;nbsp; Every Request come routing&amp;nbsp; &amp;nbsp;match Route Table then&amp;nbsp; call particular&amp;nbsp; controller&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;Route Table&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; We define route for each action method&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; All the routes&amp;nbsp; are stored in route table&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; Each incoming request mapped to this route table&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There are 2 type use Routing in MVC Application&lt;/div&gt;
&lt;div&gt;
Traditional Way&lt;/div&gt;
&lt;div&gt;
Attribute routing&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;nbsp;Traditional Way&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In&amp;nbsp; a traditional&amp;nbsp; &amp;nbsp;way&amp;nbsp; routing define route particular file routeconfig.cs with in &lt;b&gt;app-start&lt;/b&gt; folder&lt;br /&gt;
Routeconfig.cs&amp;nbsp; Code&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;public class RouteConfig&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static void RegisterRoutes(RouteCollection routes)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; routes.IgnoreRoute(&quot;{resource}.axd/{*pathInfo}&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; routes.MapRoute(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: &quot;allstudents&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: &quot;students&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; defaults:new {controller= &quot;Student&quot; ,action= &quot;GetAllStudent&quot; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; routes.MapRoute(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name: &quot;Students&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;url: &quot;students/{id}&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;defaults: new { controller = &quot;Student&quot;, action = &quot;GetSingleStudent&quot; },&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;constraints: new { id = @&quot;\d+&quot; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; routes.MapRoute(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: &quot;StudentsAddress&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: &quot;students/{id}/Address&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; defaults: new { controller = &quot;Student&quot;, action = &quot;StudentAddress&quot; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;routes.MapRoute(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: &quot;Default&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: &quot;{controller}/{action}/{id}&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; defaults: new { controller = &quot;Home&quot;, action = &quot;Index&quot;, id = UrlParameter.Optional }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/7156214799567786692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/7156214799567786692' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/7156214799567786692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/7156214799567786692'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/08/routing-in-mvc-4-and-5.html' title='Routing in MVC 4 and 5'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-1747225010949618617</id><published>2019-08-01T22:43:00.001-07:00</published><updated>2020-07-17T01:30:19.773-07:00</updated><title type='text'>Difference between Static Constructors and Non-Static Constructors</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #171717; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;A static constructor is used to initialize any&amp;nbsp;&lt;/span&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/static&quot; style=&quot;background-color: white; box-sizing: inherit; cursor: pointer; font-family: &amp;quot;Segoe UI&amp;quot;, SegoeUI, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word; text-decoration-line: none;&quot;&gt;static&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #171717; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;data, or to perform a particular action that needs to be performed once only. It is called automatically before the first instance is created or any static members are referenced.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #171717; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;background-color: #fafafa; box-sizing: inherit; color: #0101fd; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; outline-color: inherit; white-space: pre;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hljs-title&quot; style=&quot;background-color: #fafafa; box-sizing: inherit; color: #007d9a; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; outline-color: inherit; white-space: pre;&quot;&gt;SimpleClass&lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt;
{
    &lt;/span&gt;&lt;span class=&quot;hljs-comment&quot; style=&quot;background-color: #fafafa; box-sizing: inherit; color: green; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; outline-color: inherit; white-space: pre;&quot;&gt;// Static variable that must be initialized at run time.&lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;background-color: #fafafa; box-sizing: inherit; color: #0101fd; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; outline-color: inherit; white-space: pre;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;background-color: #fafafa; box-sizing: inherit; color: #0101fd; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; outline-color: inherit; white-space: pre;&quot;&gt;readonly&lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;background-color: #fafafa; box-sizing: inherit; color: #0101fd; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; outline-color: inherit; white-space: pre;&quot;&gt;long&lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt; baseline;

    &lt;/span&gt;&lt;span class=&quot;hljs-comment&quot; style=&quot;background-color: #fafafa; box-sizing: inherit; color: green; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; outline-color: inherit; white-space: pre;&quot;&gt;// Static constructor is called at most one time, before any&lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;hljs-comment&quot; style=&quot;background-color: #fafafa; box-sizing: inherit; color: green; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; outline-color: inherit; white-space: pre;&quot;&gt;// instance constructor is invoked or member is accessed.&lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;hljs-function&quot; style=&quot;background-color: #fafafa; box-sizing: inherit; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; outline-color: inherit; white-space: pre;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: inherit; color: #0101fd; outline-color: inherit;&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;hljs-title&quot; style=&quot;box-sizing: inherit; color: #007d9a; outline-color: inherit;&quot;&gt;SimpleClass&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;/span&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt;
    {
        baseline = DateTime.Now.Ticks;
    }
}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #171717; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;background-color: white; box-sizing: inherit; color: #171717; font-family: &amp;quot;Segoe UI&amp;quot;, SegoeUI, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; list-style: none; margin: 16px 0px 16px 38px; outline-color: inherit; padding: 0px;&quot;&gt;
&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; margin-top: 1rem; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;
A static constructor does not take access modifiers or have parameters.&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; margin-top: 1rem; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;
A class or struct can only have one static constructor.&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: inherit; list-style: outside none disc; margin: 0px; outline-color: inherit; outline-style: initial; outline-width: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;box-sizing: inherit; margin-top: 1rem; outline-color: inherit; overflow-wrap: break-word; padding: 0px;&quot;&gt;
Static constructors cannot be inherited or overloaded.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: rgba(0 , 0 , 0 , 0.84); font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;Non-static constructors are used to initializing the non-static members of the class&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: rgba(0 , 0 , 0 , 0.84); font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: rgba(0 , 0 , 0 , 0.84); font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;strong style=&quot;border: 0px; color: rgba(0, 0, 0, 0.84); font-family: Roboto, sans-serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Times of Execution:&lt;/strong&gt;&lt;span style=&quot;color: rgba(0, 0, 0, 0.84); font-family: Roboto, sans-serif;&quot;&gt;&amp;nbsp;A static constructor will always execute once in the entire life cycle of a class. But a non-static constructor can execute zero time if no instance of the class is created and n times if the n instances are created.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: rgba(0 , 0 , 0 , 0.84); font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;span style=&quot;color: rgba(0, 0, 0, 0.84); font-family: Roboto, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/1747225010949618617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/1747225010949618617' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/1747225010949618617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/1747225010949618617'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/08/difference-between-static-constructors.html' title='Difference between Static Constructors and Non-Static Constructors'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-6042764669910946849</id><published>2019-08-01T21:45:00.000-07:00</published><updated>2019-08-02T01:24:12.052-07:00</updated><title type='text'>SQL Server Isolation Level</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-weight: 500; line-height: 1.1; margin: 20px 0px 10px;&quot;&gt;
Read Committed&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-weight: 500; line-height: 1.1; margin: 20px 0px 10px;&quot;&gt;
Read UnCommitted&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-weight: 500; line-height: 1.1; margin: 20px 0px 10px;&quot;&gt;
Repeatable Read&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-weight: 500; line-height: 1.1; margin: 20px 0px 10px;&quot;&gt;
Seriazable&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; line-height: 1.1; margin: 20px 0px 10px;&quot;&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-weight: 500;&quot;&gt;
Snapshot&lt;/div&gt;
&lt;h2 style=&quot;box-sizing: border-box; color: #333333; font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-size: 30px; font-weight: 500; line-height: 1.1; margin-bottom: 10px; margin-top: 20px;&quot;&gt;
Read Committed&lt;/h2&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-weight: 500;&quot;&gt;
READ Comitted&amp;nbsp; take only Committed value if any transaction pending or incomplete wait for till operation complete&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-weight: 500;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-weight: 500;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif;&quot;&gt;
&lt;b&gt;Read Uncommitted&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
If any table is (updated Insert delete update) and transaction is waiting for complete or roll back&amp;nbsp; uncomitted&amp;nbsp; value display&amp;nbsp; it is called dirty read&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif;&quot;&gt;
if we want to read only committed rows use&amp;nbsp; keyword with(nolock)&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: helvetica neue, helvetica, arial, sans-serif;&quot;&gt;&amp;nbsp; select * from Emp with(nolock)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-weight: 500;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;helvetica neue&amp;quot;, helvetica, arial, sans-serif; font-weight: 500;&quot;&gt;
&lt;a href=&quot;http://www.besttechtools.com/articles/article/sql-server-isolation-levels-by-example&quot;&gt;http://www.besttechtools.com/articles/article/sql-server-isolation-levels-by-example&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/6042764669910946849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/6042764669910946849' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/6042764669910946849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/6042764669910946849'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/08/sql-server-isolation-level.html' title='SQL Server Isolation Level'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-8833194190793171955</id><published>2019-07-25T06:10:00.003-07:00</published><updated>2019-07-27T21:48:14.046-07:00</updated><title type='text'>SET NOCOUNT (Transact-SQL)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;segoeui&amp;quot; , &amp;quot;segoe wp&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;When SET NOCOUNT is ON, the&amp;nbsp;&amp;nbsp;number of rows affected&amp;nbsp; is not returned. When SET NOCOUNT is OFF, number of rows affected&amp;nbsp; is returned.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/8833194190793171955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/8833194190793171955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8833194190793171955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8833194190793171955'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/set-nocount-transact-sql.html' title='SET NOCOUNT (Transact-SQL)'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-779640502352834085</id><published>2019-07-25T06:07:00.001-07:00</published><updated>2019-07-27T23:16:29.642-07:00</updated><title type='text'>Indexing in Sql</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;An index is used to fast searching&amp;nbsp; record&amp;nbsp; with &lt;b&gt;select Query&amp;nbsp; &lt;/b&gt;and &lt;b&gt;where Clause&amp;nbsp;&lt;/b&gt;&amp;nbsp;but its slow down with&amp;nbsp; input data &lt;b&gt;Insert &lt;/b&gt;and&amp;nbsp;&amp;nbsp;&lt;b&gt;Update&amp;nbsp;&lt;/b&gt;&lt;/span&gt;and &lt;b&gt;deletes&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;An index can be used to efficiently find all rows matching some column in your query and then walk through only that subset of the table to find exact matches. If you don&#39;t have indexes on any column in the&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: #eff0f1; border: 0px; box-sizing: inherit; color: #242729; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;WHERE&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&amp;nbsp;clause, the&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: #eff0f1; border: 0px; box-sizing: inherit; color: #242729; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;SQL&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&amp;nbsp;server has to walk through&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;the whole table&lt;/em&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&amp;nbsp;and check every row to see if it matches, which may be a slow operation on big tables.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Clustered&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&amp;nbsp;index creates a physical order of rows Basically Primary Key&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Nonclustered&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&amp;nbsp;index is also a binary tree but it doesn&#39;t create a physical order of rows.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;
Unique Indexe&amp;nbsp;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;Unique Index does not&amp;nbsp; allow any dublicate value to&amp;nbsp; be inserted&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
create table TestIndex&lt;/div&gt;
&lt;div&gt;
(MemberId int ,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;Name nvarchar(50),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; Age int )&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
create unique index U_MemberId&lt;/div&gt;
&lt;div&gt;
on&amp;nbsp; TestIndex(MemberId)&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
Implicit Indexes&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-weight: normal;&quot;&gt;Index are automatically created when&amp;nbsp; primary and&amp;nbsp; unique&amp;nbsp; &amp;nbsp;key&amp;nbsp; are created&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Avoid Indexing&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Index should not used small table&lt;/li&gt;
&lt;li&gt;Index should not be used that column that contains&amp;nbsp;heigh number of null value&lt;/li&gt;
&lt;li&gt;Column that are frequently manipulated&amp;nbsp; should not be used&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/779640502352834085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/779640502352834085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/779640502352834085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/779640502352834085'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/indexing-in-sql.html' title='Indexing in Sql'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-1315632538057492156</id><published>2019-07-25T05:58:00.001-07:00</published><updated>2019-07-28T00:15:30.945-07:00</updated><title type='text'>One Abstract  Classcan  Inherit Another Abstract Class</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #263238; font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;Yes you can&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #263238; font-family: Roboto, sans-serif; font-size: 13px;&quot;&gt;inherit&lt;/b&gt;&lt;span style=&quot;color: #263238; font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&amp;nbsp;an&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #263238; font-family: Roboto, sans-serif; font-size: 13px;&quot;&gt;abstract class&lt;/b&gt;&lt;span style=&quot;color: #263238; font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&amp;nbsp;from&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #263238; font-family: Roboto, sans-serif; font-size: 13px;&quot;&gt;another abstract class&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;namespace ConsoleApplication9&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;{&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; abstract class&amp;nbsp; A&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;color: #263238; font-family: roboto, sans-serif; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; public abstract&amp;nbsp; void Method();&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;abstract class B:A&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp;{&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;color: #263238; font-family: roboto, sans-serif; font-size: 13px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public abstract void MethodB();&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp;}&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;class C:B&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public override void Method()&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;A&quot;);&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public override&amp;nbsp; void MethodB()&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;B&quot;);&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; class Program&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static void Main(string[] args)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; C obj = new C();&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; obj.Method();&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; obj.MethodB();&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadLine();&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #263238; font-family: roboto, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/1315632538057492156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/1315632538057492156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/1315632538057492156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/1315632538057492156'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/one-abstract-classcan-inherit-another.html' title='One Abstract  Classcan  Inherit Another Abstract Class'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-2652138497867713899</id><published>2019-07-25T05:29:00.001-07:00</published><updated>2019-07-28T06:09:37.612-07:00</updated><title type='text'>Cursors in SQL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;A cursor is a temporary work area created in system memory when a SQL statement is executed&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;a cursor can hold more than one row, but can process only one row at a time&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: Roboto, sans-serif; font-size: 24px; font-weight: 400; line-height: 1.1; margin-bottom: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;box-sizing: border-box;&quot;&gt;Types of Cursors&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;
There are the following two types of Cursors:&lt;/div&gt;
&lt;ol style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Implicit Cursor&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Explicit Cursor&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px; line-height: 1.5; margin-bottom: 1em; margin-top: 1em;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Implicit Cursor&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;
These types of cursors are generated and used by the system during the manipulation of a DML query (INSERT, UPDATE&amp;nbsp;and DELETE). An implicit cursor is also generated by the system when a single row is selected by a SELECT command.&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Explicit Cursor&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
&lt;div style=&quot;color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;
This type of cursor is generated by the user using a SELECT command. An explicit cursor contains more than one row, but only one row can be processed at a time. An explicit cursor moves one by one over the records. An explicit cursor uses a pointer that holds the record of a row. After fetching a row, the cursor pointer moves to the next row.&lt;/div&gt;
&lt;div style=&quot;color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;DECLARE&amp;nbsp; @b INT =0;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;DECLARE @MemberId INT&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; DECLARE db_Lotterycursor CURSOR&amp;nbsp; FOR&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; SELECT userid&amp;nbsp; &amp;nbsp;FROM tblUserInfo ORDER BY userid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;OPEN db_Lotterycursor&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; FETCH NEXT FROM db_Lotterycursor INTO @MemberId&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;WHILE @@FETCH_STATUS = 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp;BEGIN&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; DECLARE @nam NVARCHAR(50)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SET&amp;nbsp; @b=@MemberId;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SET @nam = (SELECT tblUserInfo.AccountNo&amp;nbsp; FROM&amp;nbsp; tblUserInfo&amp;nbsp; WHERE UserID =@b)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;UPDATE Members SET Members.Email&amp;nbsp; =@nam&amp;nbsp; WHERE MemberId =@b&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp; FETCH NEXT FROM db_Lotterycursor INTO&amp;nbsp; @MemberId&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp; END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CLOSE db_Lotterycursor&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #212121; font-family: open sans, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DEALLOCATE db_Lotterycursor&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/2652138497867713899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/2652138497867713899' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/2652138497867713899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/2652138497867713899'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/cursors-in-sql.html' title='Cursors in SQL'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-8513785256464311599</id><published>2019-07-25T05:12:00.002-07:00</published><updated>2019-07-28T06:18:40.731-07:00</updated><title type='text'>What is difference between Abstract Class and Static Class</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b style=&quot;color: #263238; font-family: roboto, sans-serif; font-size: 13px;&quot;&gt;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CLR&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-weight: 400;&quot;&gt;&amp;nbsp;marks all &#39;static&#39; classes as &#39;&lt;/span&gt;&lt;em style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: 400; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;abstract &amp;amp; sealed&lt;/em&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-weight: 400;&quot;&gt;&#39; behind the scene&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #263238; font-family: roboto, sans-serif; font-size: 13px;&quot;&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;color: #263238; font-family: roboto, sans-serif; font-size: 13px;&quot;&gt;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Abstract Class (Base class):&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-weight: 400;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; box-sizing: inherit; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;em style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Enables other classes to inherit&lt;/em&gt;&lt;/strong&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/8513785256464311599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/8513785256464311599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8513785256464311599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8513785256464311599'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/what-is-difference-between-abstract.html' title='What is difference between Abstract Class and Static Class'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-8230963795170987210</id><published>2019-07-25T04:51:00.001-07:00</published><updated>2019-07-25T05:20:01.581-07:00</updated><title type='text'>Asp .net page life cycle</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;PreInit&amp;nbsp; &lt;/b&gt;&amp;nbsp;event is the first event fo the page life cycle it check the&amp;nbsp; IsPostBack Property and determine whether&amp;nbsp; the page is postback and set theme&amp;nbsp; and MasterPage&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Init:&lt;/b&gt;&amp;nbsp;Init event initialize the control property and the control tree is built&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;InitComplete :&lt;/b&gt;&amp;nbsp;InitComplete event allows tracking of view state all the controls turn on view state tracking&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;PreLoad &lt;/b&gt;Its raised when page loads view state and Load PostBackData&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Load&amp;nbsp;&amp;nbsp;&lt;/b&gt; Firstly Page calls&amp;nbsp; the OnLoad Method On Page Objects Then recursively OnLoad for each control is invoked&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Load Complete&amp;nbsp;&lt;/b&gt; Page is completely loaded on client side&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;PreRender &lt;/b&gt;Raised&amp;nbsp; after page object has created all control that are required in order to render page&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;PreRenderComplete&amp;nbsp; &lt;/b&gt;Raised after each data bound control whose datasourceId property is set calls its databind method&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SaveStateComplete&amp;nbsp;&amp;nbsp;&lt;/b&gt;Raised after view stateand control state have been saved for the page and for all control&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Unload&amp;nbsp; &lt;/b&gt;this event is first raised&amp;nbsp; for each control&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/8230963795170987210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/8230963795170987210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8230963795170987210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8230963795170987210'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/asp-net-page-life-cycle.html' title='Asp .net page life cycle'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-595575294333266408</id><published>2019-07-24T22:07:00.003-07:00</published><updated>2019-07-28T07:27:11.983-07:00</updated><title type='text'>Difference between union and union all</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;table bgcolor=&quot;#ffffff&quot; border=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;border-collapse: collapse; box-sizing: border-box; color: #333333; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px; outline: 0px; width: 100%px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box; outline: 0px;&quot;&gt;
&lt;tr bgcolor=&quot;#0270bf&quot; style=&quot;box-sizing: border-box; outline: 0px;&quot;&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: white;&quot;&gt;UNION&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: white;&quot;&gt;UNION ALL&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;UNION removes duplicate rows.&lt;/td&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;“UNION ALL” does not remove the duplicate row. It returns all from all queries.&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;UNION uses a distinct sort&lt;/td&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;“UNION ALL” does not use a distinct sort, so the performance of “UNION ALL” is slightly higher than “UNION”.&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;UNION cannot work with a column that has a TEXT data type.&lt;/td&gt;&lt;td style=&quot;border: 1px dashed rgb(171, 171, 171); box-sizing: border-box;&quot;&gt;UNION ALL can work with all data type columns.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;div&gt;
&lt;div&gt;
DECLARE @Table1 AS Table (ID INT, Name VARCHAR(10), PhoneNumber VARCHAR(12))&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
DECLARE @Table2 AS Table (ID INT, Name VARCHAR(10), PhoneNumber VARCHAR(12))&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
INSERT INTO @Table1 VALUES(1,&#39;Tejas&#39;, &#39;88996655&#39;)&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
INSERT INTO @Table1 VALUES(2,&#39;Jignesh&#39;, &#39;99986655&#39;)&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
INSERT INTO @Table2 VALUES(1,&#39;Tejas&#39;, &#39;88996655&#39;)&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
INSERT INTO @Table2 VALUES(2,&#39;Purvi&#39;, &#39;99986655&#39;)&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
SELECT * FROM @Table1&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
UNION&amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
SELECT * FROM @Table2&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/595575294333266408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/595575294333266408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/595575294333266408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/595575294333266408'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/difference-between-union-and-union-all.html' title='Difference between union and union all'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-221375627063640101</id><published>2019-07-24T09:09:00.002-07:00</published><updated>2019-07-24T09:09:23.796-07:00</updated><title type='text'>Find duplicate Record   and delete duplicate Record</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
CREATE TABLE tbl_RemoveDuplicate&lt;br /&gt;
(&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ID INTEGER PRIMARY KEY&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;,Name VARCHAR(150)&lt;br /&gt;
)&lt;br /&gt;
GO&lt;br /&gt;
&lt;br /&gt;
INSERT INTO tbl_RemoveDuplicate VALUES&lt;br /&gt;
(1,&#39;ABC&#39;),(2,&#39;XYZ&#39;)&lt;br /&gt;
,(3,&#39;XYZ&#39;),(4,&#39;RFQ&#39;)&lt;br /&gt;
,(5,&#39;PQR&#39;),(6,&#39;EFG&#39;)&lt;br /&gt;
,(7,&#39;EFG&#39;),(8,&#39;ABC&#39;)&lt;br /&gt;
&lt;br /&gt;
select Name from tbl_RemoveDuplicate group by Name having count(*) &amp;gt;1&lt;br /&gt;
&lt;br /&gt;
;with cte as&lt;br /&gt;
(select Name, ROW_NUMBER()over (partition by Name order by Name desc) as Id from tbl_RemoveDuplicate&lt;br /&gt;
)&lt;br /&gt;
delete from cte where id&amp;gt;1&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/221375627063640101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/221375627063640101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/221375627063640101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/221375627063640101'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/find-duplicate-record-and-delete.html' title='Find duplicate Record   and delete duplicate Record'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-579124748275177784</id><published>2019-07-23T11:11:00.002-07:00</published><updated>2019-07-23T11:12:46.358-07:00</updated><title type='text'>What is the difference between “HTML.TextBox” vs “HTML.TextBoxFor”?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #8d8d8d; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 15px;&quot;&gt;Both of them provide the same HTML output, “HTML.TextBoxFor” is strongly typed while “HTML.TextBox” isn’t.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/579124748275177784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/579124748275177784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/579124748275177784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/579124748275177784'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/what-is-difference-between-htmltextbox.html' title='What is the difference between “HTML.TextBox” vs “HTML.TextBoxFor”?'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-3189046424917809677</id><published>2019-07-23T11:11:00.000-07:00</published><updated>2019-07-23T11:11:06.030-07:00</updated><title type='text'>Difference between LEN() and DATALENGTH() in sql server ?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #8d8d8d; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 15px;&quot;&gt;Len will give you how many characters are there in data(Any data type) whereas DataLenth() will give you how much memory required to store the same data&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/3189046424917809677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/3189046424917809677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/3189046424917809677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/3189046424917809677'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/difference-between-len-and-datalength.html' title='Difference between LEN() and DATALENGTH() in sql server ?'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-4821653889643481256</id><published>2019-07-23T08:50:00.002-07:00</published><updated>2019-07-28T07:48:50.521-07:00</updated><title type='text'>Difference between List and Arraylist</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Arraylist is the non-generic&amp;nbsp; collection while list is generic collection&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/4821653889643481256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/4821653889643481256' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/4821653889643481256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/4821653889643481256'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/difference-between-list-and-arraylist.html' title='Difference between List and Arraylist'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-5629764656603713838</id><published>2019-07-23T06:40:00.001-07:00</published><updated>2019-07-23T08:36:34.654-07:00</updated><title type='text'>What is collection  in c#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Collections represents group of objects which used to perform various functions such as storing,updaing,retrieving,searching,sorting e.g List&amp;lt;T&amp;gt;&lt;br /&gt;
&lt;br /&gt;
//List e.g&lt;br /&gt;
static void Main(string[] args)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var student = new List&amp;lt;string&amp;gt;();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; student.Add(&quot;A&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; student.Add(&quot;B&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;foreach (var item in student)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(item);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadLine();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
stack e.g&lt;br /&gt;
&amp;nbsp; static void Main(string[] args)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Stack&amp;lt;int&amp;gt; i = new Stack&amp;lt;int&amp;gt;();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i.Push(8);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i.Push(3);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var item in i)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(item);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadLine();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
// Queue e.g&lt;br /&gt;
&amp;nbsp; static void Main(string[] args)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Queue&amp;lt;int&amp;gt; i = new Queue&amp;lt;int&amp;gt;();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i.Enqueue(1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i.Enqueue(2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i.Enqueue(3);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var item in i)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(item);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i.Dequeue();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var item in i)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(item);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadLine();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;b&gt;List,Queue,stack dulicate element&amp;nbsp; can add&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/5629764656603713838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/5629764656603713838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/5629764656603713838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/5629764656603713838'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/what-is-collection-in-c.html' title='What is collection  in c#'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-3708731480506109114</id><published>2019-07-23T06:21:00.001-07:00</published><updated>2019-07-23T06:31:42.057-07:00</updated><title type='text'>Difference between var and dynamic keyword</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;strong style=&quot;background-color: white; border: 0px; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;Statically typed&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;– This means the type of variable declared is decided by the compiler at compile time.&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; border: 0px; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;Dynamically typed&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;- This means the type of variable declared is decided by the compiler at runtime time.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;strong style=&quot;background-color: white; border: 0px; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;Need&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;to initialize at the time of declaration.&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; border: 0px; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;No&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; border: 0px; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;need&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;to initialize at the time of declaration.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;strong style=&quot;background-color: white; border: 0px; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;Errors are caught at compile time.&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white; border: 0px; color: #111111; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Errors are caught at runtime&lt;/strong&gt;&lt;/strong&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/3708731480506109114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/3708731480506109114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/3708731480506109114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/3708731480506109114'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/difference-between-var-and-dynamic.html' title='Difference between var and dynamic keyword'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-1023207869961020448</id><published>2019-07-23T06:14:00.001-07:00</published><updated>2019-07-28T08:05:04.965-07:00</updated><title type='text'>Difference Between IQueryable, IEnumerable, And IList In LINQ</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;IEnumerable and IQueryable, both are interfaces to a .NET collection&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;IQueryable is Subset of&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;IEnumerable&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp; and inheritance&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;IEnumerable&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;IQueryable executed all the filters on the server-side and fetched the records that are matching all conditions and filters&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;the filter is not applied on the server side but first, it fetches all the records from the server and applies on the client side&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;em style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;IEnumerable&amp;nbsp;&lt;/em&gt;&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;is useful when we want to iterate the collection of objects which deals with in-process memory&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;img alt=&quot;Image 2 for IEnumerable vs IQueryable&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXAlstme58_vX6ueTBuiEgrRXvjdRUp4MQA80M-svjG3_hiQV3OuUIk_aU_t6FaWoxDaBLTAdPAzePaBrg3Dx5HkiHgwosNob-4-zxZDWCN7_9q9SibexLG3MlNeoGixKyiHK-6nDGiw/s1600/image+2.png&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;em style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;IQueryable&lt;/em&gt;&lt;strong style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot;, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;is useful when we want to iterate a collection of objects which deals with ad-hoc queries against the data source or remote database, like SQL Server&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #212121; font-family: &amp;quot;open sans&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;img alt=&quot;Image 3 for IEnumerable vs IQueryable&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi81_QptTfloaUMNNJZklu4BLqrWEpFgAvSlfxcg9Pm3JMmKeg3rJjt3YMeZ6BSSrNuPEIyds2395GuXB_YGDSSWoL5sf96vPrKdj7IGOxXo9vdyY-HODWe1wQlU_iPdYRY39NiOE3cLw/s1600/image+3.png&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/1023207869961020448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/1023207869961020448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/1023207869961020448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/1023207869961020448'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/difference-between-iqueryable.html' title='Difference Between IQueryable, IEnumerable, And IList In LINQ'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXAlstme58_vX6ueTBuiEgrRXvjdRUp4MQA80M-svjG3_hiQV3OuUIk_aU_t6FaWoxDaBLTAdPAzePaBrg3Dx5HkiHgwosNob-4-zxZDWCN7_9q9SibexLG3MlNeoGixKyiHK-6nDGiw/s72-c/image+2.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-6106015251896725610</id><published>2019-07-18T07:47:00.001-07:00</published><updated>2019-08-01T21:30:26.266-07:00</updated><title type='text'>The Difference Between ROW_NUMBER(), RANK(), and DENSE_RANK()</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;background-color: white; color: #ff9900; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 19px; font-weight: normal; line-height: 1.4;&quot;&gt;
Row_Number()&lt;/h3&gt;
&lt;div&gt;
Syntax&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;Row_Number() Over( partition by clause order by clause)&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #fafafa; font-family: , &amp;quot;consolas&amp;quot; , &amp;quot;liberation mono&amp;quot; , &amp;quot;menlo&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;This function will assign a unique id to each row returned from the query.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;DECLARE @Table TABLE (&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Col_Value varchar(2)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;INSERT INTO @Table (Col_Value)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES (&#39;A&#39;),(&#39;A&#39;),(&#39;A&#39;),(&#39;B&#39;),(&#39;B&#39;),(&#39;C&#39;),(&#39;C&#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Col_Value,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ROW_NUMBER() OVER ( partition by col_value ORDER BY Col_Value) AS &#39;RowID&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;@Table;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;OUTPUT&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;Col_Value&amp;nbsp; &amp;nbsp; &amp;nbsp;RowID&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Col_Value,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ROW_NUMBER() OVER ( ORDER BY Col_Value) AS &#39;RowID&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;@Table;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;Col_Value&amp;nbsp; &amp;nbsp; &amp;nbsp;RowID&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #ffe599;&quot;&gt;Rank()&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
Syntax&lt;br /&gt;
Rank() Over( partition by clause order by clause)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #ffe599;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;Same&amp;nbsp; as Row_Number() except&amp;nbsp; provide same rank for equal rows and also gap&amp;nbsp; between the different rank we can avoid using Dense_Rank() keyword&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;span style=&quot;color: #ffe599;&quot;&gt;Dense_Rank()&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #76a5af;&quot;&gt;Provide same rank for equal rows&amp;nbsp; &amp;nbsp;function do not have gap alway given consective Rank value&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;span style=&quot;color: #76a5af;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
Syntax&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;span style=&quot;color: #76a5af;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Dense_Rank() Over( partition by clause order by clause)&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #76a5af;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #111111; font-family: &amp;quot;segoe ui&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/6106015251896725610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/6106015251896725610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/6106015251896725610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/6106015251896725610'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/the-difference-between-rownumber-rank.html' title='The Difference Between ROW_NUMBER(), RANK(), and DENSE_RANK()'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-8943047340498814912</id><published>2019-07-18T07:44:00.001-07:00</published><updated>2019-07-18T07:49:43.093-07:00</updated><title type='text'>How can improve Performance of stored procedure</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 12px;&quot;&gt;Keep database object name short ,meaningful and easy to remember&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 12px;&quot;&gt;Normalize data atleast upto 3rd&amp;nbsp;form but not at the cost of query performance&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 12px;&quot;&gt;Do not use those column in the select statement which are not required. Never user select * statement.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 12px;&quot;&gt;&amp;nbsp;Use primary key in the table to filter the data in where clause. Use execution plan to analyze the query&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 12px;&quot;&gt;Use SET NOCOUNT ON at the beginning of your stored procedures&amp;nbsp;&amp;nbsp;&lt;/span&gt;This statement is used to stop the message, which shows the number of rows affected by SQL statement like INSERT, UPDATE and DELETE It will remove this extra overhead from the network.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; color: #212121; font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 12px;&quot;&gt;Use table variables instead of temporary tables.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/8943047340498814912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/8943047340498814912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8943047340498814912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8943047340498814912'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/how-can-improve-performance-of-stored.html' title='How can improve Performance of stored procedure'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-8245702539521693664</id><published>2019-07-18T05:59:00.000-07:00</published><updated>2019-08-01T21:49:40.351-07:00</updated><title type='text'>What is Angular  Directive</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Directive are marker of DOM&amp;nbsp; tells compiler&amp;nbsp; to attach a specified behaviour to DOM&amp;nbsp; element&lt;br /&gt;
Angular js come some predefined directive&lt;br /&gt;
&lt;br /&gt;
Directve List&lt;br /&gt;
&lt;br /&gt;
ng-app&lt;br /&gt;
ng-model&lt;br /&gt;
ng-init&lt;br /&gt;
ng-repeat&lt;br /&gt;
ng-bind&lt;br /&gt;
ng-controller&lt;br /&gt;
ng-value&lt;br /&gt;
ng-show&lt;br /&gt;
ng-hide&lt;br /&gt;
ng-disabled&lt;br /&gt;
ng-required&lt;br /&gt;
ng-click&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It will extend the functionality of HTML like range no,input length etc&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/8245702539521693664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/8245702539521693664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8245702539521693664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/8245702539521693664'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/what-is-angular-dirctive.html' title='What is Angular  Directive'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4111577523011141580.post-1434932507815997651</id><published>2019-07-17T09:09:00.001-07:00</published><updated>2019-07-17T09:29:46.308-07:00</updated><title type='text'>Bundling and Minification MVC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Bundling is&amp;nbsp; a technique to improve performance by reducing the number of request to&amp;nbsp; the server&lt;br /&gt;
Instead of fetching all resource one by&amp;nbsp; one we create bundle and fetch bundle that bundle in one single resource&lt;br /&gt;
&lt;br /&gt;
To add a new bundle we can use BundleConfig&amp;nbsp; file&lt;br /&gt;
In this file we use Bundlecollection&amp;nbsp; class Which is available in System.Web.Optimization&lt;br /&gt;
Bundle need to registered Global.asax&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Render Bundle&lt;br /&gt;
To Create js bundle we use @Script.Render(path)&lt;br /&gt;
To Create css bundle we use @Styes.Render(path)&lt;br /&gt;
&lt;br /&gt;
Minification is the process&amp;nbsp; of removing unnecessary&amp;nbsp; data without changing its functionality&lt;br /&gt;
&lt;br /&gt;
This include removing&lt;br /&gt;
Comments&lt;br /&gt;
Extra Space&lt;br /&gt;
convert large variabe to small size&lt;br /&gt;
&lt;br /&gt;
etc&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ask-dotnet.blogspot.com/feeds/1434932507815997651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4111577523011141580/1434932507815997651' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/1434932507815997651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4111577523011141580/posts/default/1434932507815997651'/><link rel='alternate' type='text/html' href='http://ask-dotnet.blogspot.com/2019/07/bundling-and-minification.html' title='Bundling and Minification MVC'/><author><name>Virendra Kumar</name><uri>http://www.blogger.com/profile/00819176127466670976</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>