1)what is difference between char and varchar in sql server
2005

2) what is composite key and candidate key

3) what is temporary table and derived table

4) how to calculate difference between two dates



1)what is difference between char and varchar in sql server 2005 2) what is composite key and c..

Answer / murugavel

1) char datatype is used to store fixed length character
value & varchar is used to store variable length character
value.

2) Composite Key: combination of multiple fields will
produce the uniqeness is called composite key.

Candidate Key: A field has the ability to become a primary
key is known as candidate key.

3) Temporary Table: This table is only visible to this
session of SQL Server. When I close this session, the table
will be automatically dropped. You can treat this table just
like any other table with a few exceptions. The only real
major one is that you can't have foreign key constraints on
a temporary table.

Derived Table:In very basic terms, a derived table is a
virtual table that's calculated on the fly from a select
statement. The biggest benefit of using derived tables over
using temporary tables is that they require fewer steps, and
everything happens in memory instead of a combination of
memory and disk

4) using DATEDIFF function

Ex: SELECT DATEDIFF(dd,"01 March 2010","18 March 2010")

Is This Answer Correct ?    24 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is difference between internal and protected internal in c#?

0 Answers  


What is the difference between “constant” and “readonly” variables in c#?

0 Answers  


What exception can an overridden method throw in comparison with the method it is overriding?

0 Answers   Changepond,


Can constructor be protected in c#?

0 Answers  


what is the difference between interface and multiple interface?

0 Answers   Wipro,






What does the keyword virtual mean in the method definition?

3 Answers   Ipog Software, Satyam, Visual Soft,


What is meant by enumerable in c#?

0 Answers  


What is jagged array?

0 Answers  


What is a three-tier application.

0 Answers   Siebel,


Where do you add an event handler ?

1 Answers  


Explain the Scope of public/private/friend/protected/protected friend.

1 Answers   Rigel Networks, Wipro,


Why delegates are type safe?

0 Answers  


Categories