Sunday, 24 November 2013

What are joins?


  1. What are joins?
    Sometimes we have to select data from two or more tables to make our result complete. We have to perform a join.

What is serialization?

What is serialization?

Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process of creating an object from a stream of bytes. Serialization/Deserialization is mostly used to transport objects (e.g. during remoting), or to persist objects (e.g. to a file or database).

What is garbage collection?



What is garbage collection?

Garbage collection is a system whereby a run-time component takes responsibility for managing the lifetime of objects and the heap memory that they occupy. This concept is not new to .NET - Java and many other languages/runtimes have used garbage collection for some time.

singleton and singlecall.


singleton and singlecall.

Singleton
types never have more than one instance at any one time. If an instance exists, all client requests are serviced by that instance.
Single Call types always have one instance per client request. The next method invocation will be serviced by a different server instance, even if the previous instance has not yet been recycled by the system

What base class do all Web Forms inherit from


What base class do all Web Forms inherit from?
System.Web.UI.Page

Thursday, 21 November 2013

How do I select 2nd highest salaried employee from my EMPLOYEE table?


How do I select 2nd highest salaried employee from my EMPLOYEE table?
Ans.

SELECT
EMPLOYEE.*, MAX(EMPLOYEE.Salary) AS SalarySecondHighest
FROM EMPLOYEE
WHERE EMPLOYEE.Salary<
(SELECT
MAX(EMPLOYEE.Salary) AS SalaryFirstHighest
FROM EMPLOYEE)

Which date function is used to find the difference between two dates?



Which date function is used to find the difference between two dates?
 
Ans.
SELECT DATEDIFF(dd,'10-10-2010','15-10-2010')

Popular Posts