KyaPoocha.com

Huge Collection of Interview Questions


Archive for July, 2006

What is the wildcard character in SQL? 

Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve... Read more »

What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET? 

SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources,... Read more »

# What is the role of the DataReader class in ADO.NET connections? 

It returns a read-only, forward-only rowset from the data source. A DataReader provides fast access when a forward-only sequential read is needed.  Read more »

Can you prevent your class from being inherited by another class? 

Yes. The keyword “sealed” will prevent the class from being inherited.  Read more »

What’s the C# syntax to catch any possible exception? 

A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}  Read more »

What’s the difference between the System.Array.CopyTo() and System.Array.Clone()? 

The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into... Read more »

What’s the advantage of using System.Text.StringBuilder over System.String? 

StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time a string is changed, a new... Read more »

What’s the difference between System.String and System.Text.StringBuilder classes? 

System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.  Read more »

What does the term immutable mean? 

The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created... Read more »

What is Startup and Shutdown ? 

STARTUP is the process of starting an instance, presumably with the intent of mounting and opening a database in order to make a database system available for use. To... Read more »

How to Run a Query on a Remote SQL Server? 

Use the OpenRowSet Function to Run a Query on a Remote SQL Server You can use the OPENROWSET( ) function to run a query on a remote SQL server by using the following... Read more »

What is Except Operator? 

To find rows in one set that do not exist in another set, use the except operator (as defined in SQL-92 and SQL-99). For example, here’s how you find column1... Read more »

Is it possible to delete duplicate rows in a table without using a temporary table (i.e., just do it with a single SQL statement)? 

All you need to do is compare the table to itself to find out which candidates are duplicates. Do this by assigning aliases to the table so you can use it twice,... Read more »

If my SQL Server has the following specs: 6.05.02 SQL-DMO 6.50.252 DB-Library Which version do I have? And which service pack version do I have? 

If you want to query the version of SQL Server that’s currently running you can use the @@version variable: SELECT @@version This returns the version, processor,... Read more »

I would like to create a stored procedure that runs a query and outputs the results to a text file and allows me to add extra delimeters and static field info. 

SQL Server has no native command for outputting query results to a file. You can use the extended stored procedure xp_cmdshell and call isql (command-line SQL)... Read more »

Page 27 of 28« First...«2425262728»