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
Answer Posted / 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 View All Answers
What is the main purpose of delegates in c#?
What is the difference between gettype and typeof in c#?
Explain more on CLR
What does firstordefault mean in c#?
Is clr a compiler?
Can I fly with a loop recorder?
What is boxing and unboxing in c#?
These questions were asked me in a technical interview: •If we deploy an application on multiple server (like database server, web server) then, each request should be redirected to proper server, then how you will handle it in your code? •How security pinholes will be handled in an application? •What things should be considered while writing a web application? •How will you do load/performance testing of web application? Which framework you will use for it? •How will you implement a cache for results which require a DB access? Please let me know how to write an web application considering all these points. I am not so much aware of architechural design of web application. Your guidelines will be helpful.
hi my question is about understanding a text the user entered to a site , so i want to analyse that text looking for some specific items such as "honda" "shoffere" etc.. so if this site could help or could tell me where to go with such question ,i wonder. thanks
What is sqldataadapter in c#?
What is int32 in c#?
What are namespaces, and how they are used?
What are the benefits of using generics in c#?
How do you determine whether a string represents a numeric value?
What is the use of private constructor in c#?