1.Name the classes are found in System.Data.Common NameSpace?
Ans:
DataColumnMapping
2)DataTableMapping
2. Can a table have two primary keys?
Ans:-A table can have Only One Primary key. But a table can have
composite Primary key. that means we can create composite
primary key .
upto 16 columns only.
3. select highest salary without using "top" ?
Ans:SELECT MAX(Salary) ThirdHighest
FROM Employee t
WHERE Salary <
(SELECT MAX(Salary)
FROM Employee t
WHERE Salary <
(SELECT MAX(Salary)
FROM Employee t));
4. select highest salary using "top" ?
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP n salary
FROM employee
ORDER BY salary DESC) a
ORDER BY salary
This Blog is about some useful link and some interview question in.Net. I am trying to give some useful information to you .
Thursday, 14 January 2010
Name the classes that are contained in System.Data NameSpace?
DataSet
DataTable
DataColumn
DataRow
DataRealation
Constraint
DataTable
DataColumn
DataRow
DataRealation
Constraint
Wednesday, 9 December 2009
Static Classes and Static Class Members (C# Programming Guide)
Static classes and class members are used to create data and functions that can be accessed without creating an instance of the class. Static class members can be used to separate data and behavior that is independent of any object identity: the data and functions do not change regardless of what happens to the object. Static classes can be used when there is no data or behavior in the class that depends on object identity.
Static Classes
A class can be declared static, indicating that it contains only static members. It is not possible to create instances of a static class using the new keyword. Static classes are loaded automatically by the .NET Framework common language runtime (CLR) when the program or namespace containing the class is loaded.
Use a static class to contain methods that are not associated with a particular object. For example, it is a common requirement to create a set of methods that do not act on instance data and are not associated to a specific object in your code. You could use a static class to hold those methods.
The main features of a static class are:
*
They only contain static members.
*
They cannot be instantiated.
*
They are sealed.
*
They cannot contain Instance Constructors (C# Programming Guide).
Creating a static class is therefore much the same as creating a class that contains only static members and a private constructor. A private constructor prevents the class from being instantiated.
The advantage of using a static class is that the compiler can check to make sure that no instance members are accidentally added. The compiler will guarantee that instances of this class cannot be created.
Static classes are sealed and therefore cannot be inherited. Static classes cannot contain a constructor, although it is still possible to declare a static constructor to assign initial values or set up some static state. For more information, see Static Constructors (C# Programming Guide).
Static Classes
A class can be declared static, indicating that it contains only static members. It is not possible to create instances of a static class using the new keyword. Static classes are loaded automatically by the .NET Framework common language runtime (CLR) when the program or namespace containing the class is loaded.
Use a static class to contain methods that are not associated with a particular object. For example, it is a common requirement to create a set of methods that do not act on instance data and are not associated to a specific object in your code. You could use a static class to hold those methods.
The main features of a static class are:
*
They only contain static members.
*
They cannot be instantiated.
*
They are sealed.
*
They cannot contain Instance Constructors (C# Programming Guide).
Creating a static class is therefore much the same as creating a class that contains only static members and a private constructor. A private constructor prevents the class from being instantiated.
The advantage of using a static class is that the compiler can check to make sure that no instance members are accidentally added. The compiler will guarantee that instances of this class cannot be created.
Static classes are sealed and therefore cannot be inherited. Static classes cannot contain a constructor, although it is still possible to declare a static constructor to assign initial values or set up some static state. For more information, see Static Constructors (C# Programming Guide).
Tuesday, 24 November 2009
New sql question
How many levels of Nesting a stored Procedure we can Have? 32
How can we fetch the last Identity Column Inserted in the Table @@IDENTITY,SCOPE_IDENTITY(), IDENT_CURRENT(‘DataTable’)
What is maximum number of subqueries we can write in query in SQL Server 32
What is maximum number of parameters we can add in a stored procedure 2100
Which of the following function will generate a new guid/uniqueidentifier in SQL Server
NEWID()
Which of the following function will return last value inserted into the IDENTITY column of a table @@IDENTITY
How many NonClustered Indexes be able to Created on a Table?
Which index will be created on a table by default using unique key? Non-Clustered Index
What's the maximum value can an INT data type hold? 2,147,483,647
How will you throw exception from stored procedure? @@raiseerror
You can view the nest level in a stored procedure by using the following command: SELECT @@NESTLEVEL
In SQL Server 2000, the page size is ? 8kb
We can Get List of Triggers :
How can we fetch the last Identity Column Inserted in the Table @@IDENTITY,SCOPE_IDENTITY(), IDENT_CURRENT(‘DataTable’)
What is maximum number of subqueries we can write in query in SQL Server 32
What is maximum number of parameters we can add in a stored procedure 2100
Which of the following function will generate a new guid/uniqueidentifier in SQL Server
NEWID()
Which of the following function will return last value inserted into the IDENTITY column of a table @@IDENTITY
How many NonClustered Indexes be able to Created on a Table?
Which index will be created on a table by default using unique key? Non-Clustered Index
What's the maximum value can an INT data type hold? 2,147,483,647
How will you throw exception from stored procedure? @@raiseerror
You can view the nest level in a stored procedure by using the following command: SELECT @@NESTLEVEL
In SQL Server 2000, the page size is ? 8kb
We can Get List of Triggers :
select * from Sys.Objects where Type='tr'
SELECT *FROM sys.procedures;
SELECT * FROM sys.Tables
Cursor attribute is belonged to the language? pl/sql
SELECT *FROM sys.procedures;
SELECT * FROM sys.Tables
Cursor attribute is belonged to the language? pl/sql
Monday, 9 November 2009
CAPTCHA ?
!.Full Form Of CAPTCHA ?
Ans:-Completely Automated Public Turing test to tell Computers and Humans Apart"
Ans:-Completely Automated Public Turing test to tell Computers and Humans Apart"
Subscribe to:
Posts (Atom)