1. A NULL value represents an UNKNOWN value
2. Under ANSI_NULLS ON, two NULL values will never be equal to each other because the two separate values are unknown. With ANSI_NULLS OFF, two separate NULL values will evaluate to equal values.
IF OBJECT_ID('SalesHistory')>0 DROP TABLE SalesHistory;GOCREATE TABLE [dbo].[SalesHistory]( [SaleID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY, [Product] [varchar](10) NULL, [S Read More
Executing T-Sql batch multiple times.
Description:
If we want to execute T-sql command multiple times
2000:
CREATE TABLE dbo.TEST (ID INT IDENTITY (1,1), ROWID unique identifier) CREATE TABLE dbo.TEST2 (ID INT IDENTITY (1,1), ROWID unique identifier) GO DECLARE @counter INT SET @counter = 0 WHILE @counter < 1000 BEGIN INSERT INTO dbo.TEST (ROWID) VAL Read More
Deleting a duplicate row without primary key.
Scenario:
ID
FirstName
LastName
1
Bob
Smith
2
Dave
Jones
3
Karen
White
1
Bob
Smith
1
Bob
Smith
2000:
‘filters to no. of rows to process, here it allows to take only I record
set ROWCOUNT 2
‘so here it scans only 2 records from the available 3 records and deletes those 2 records
delete from customers2 where Read More
SQL – Truncate vs Delete
Jan 7
Difference between truncate and Delete (deleting records)
Truncate
Delete
Deletes all the records by deallocating the pages which reduces the resource overhead of logging the deletion and no. of lock acquired. Only one record is entered in the transaction log that is the deallocation of page.
Deletes one row at a time which is entered in the transaction log as LSN(Log sequence no.).
Records remo Read More
Filenet WCM 5.0 FAQ
Jan 6
Access Area
What are access areas used for?
Access areas are used as an organizational tool to group elements. Elements are objects, templates, pages, users, and environments. If you group certain elements into an access area, only a user permitted in that access area will have permission to view, edit, or modify that element. Access areas are ideal for a company with different divisions, channels, or departm Read More
SQL Server Date formats
Jan 6
Date formats in sql server
DATE FORMATS
Format #
Query (current date: 12/30/2006)
Sample
1
select convert(varchar, getdate(), 1)
12/30/06
2
select convert(varchar, getdate(), 2)
06.12.30
3
select convert(varchar, getdate(), 3)
30/12/06
4
select convert(varchar, getdate(), 4)
30.12.06
5
select convert(varchar, getdate(), 5)
30-12-06
6
select convert(varchar, Read More
XML Schema Introduction
Jan 6
Introduction to XML Schema
XML Schema is an XML based alternative to DTD.
An XML schema describes the structure of an XML document.
The XML Schema language is also referred to as XML Schema Definition (XSD).
What is an XML Schema?
The purpose of an XML Schema is to define the legal building blocks of an XML document, just like a DTD.
An XML Schema:
defines elements that can appear in a document
defines att Read More
C# FAQs
Jan 6
Is there regular expression (regex) support available to C# developers?
Yes. The .NET class libraries provide support for regular expressions. Look at the documentation for the System.Text.RegularExpressions namespace.
How do I make a DLL in C#?
You need to use the /target:library compiler option
I was trying to use an “out int” parameter in one of my functions. How should I declare the variable tha Read More
C# Questions
Jan 6
Is there regular expression (regex) support available to C# developers?
Yes. The .NET class libraries provide support for regular expressions. Look at the documentation for the System.Text.RegularExpressions namespace.
How do I make a DLL in C#?
You need to use the /target:library compiler option
I was trying to use an “out int” parameter in one of my functions. How should I declare the variable that I Read More
Interview Questions C#
Jan 6
What’s the implicit name of the parameter that gets passed into the class’ set method? Value, and its datatype depends on whatever variable we’re changing.
How do you inherit from a class in C#? Place a colon and then the name of the base class. Notice that it’s double colon in C++.
Does C# support multiple inheritance? No, use interfaces instead.
When you inherit a protected class-level Read More
