.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Interview Question >> Sql Server >> Post New Question Subscribe to Interview Questions

You cannot create an Index on a column of the following data type

Posted By :Syed Shakeer Hussain     Posted Date :September 08, 2009    Points :10   Category :Sql Server 

You can also find related Interview Question to You cannot create an Index on a column of the following data type  below: 

Is it possible to create Cluster Index on Unique Key Column?

Unique key column by default creates a non-cluster index on the column. Primary key creates cluster index on the column. The only difference is Unique key column allows only one null value. So is it possible to have cluster index on Unique key column?

The answer is YES. Though Unique key allows null value but it still maintains the uniqueness of the column. (More...)

You have a column that will only contain values from 0 to 256. What's the most economical data type to use for the column?


Correct Answer : B
A SMALLINT data type uses only 2 bytes of data and can store value from -32,768 to 32,767. A TINYINT data type cannot be used because the maximum value it can hold is 255. Although an INT data type can be used, SMALLINT will use only 2 bytes compared to INT's 4 bytes. VARCHAR(3) will use 3 bytes while DECIMAL(3) will use 5 bytes.

Can we declare column with xml data type to hold xml data?

Yes, A column with xml data type can be declared. (More...)

What are the requirements to create a CLR based user-defined type?

CLR must be enabled for the instance and A class created with a CLR-compatible language. (More...)

Which property on a Combo Box do you set with a column name, prior to setting the Data Source, to display data in the combo box?

ComboBox.DataValueField = "ColumnName"

When we use Databind method for the Combo box we set Display Member and Display Value property to column name. (More...)

What is the minimum value of TINYINT data type?

0 is the minimum value of TINYINT data type (More...)

What will you do if you need to create clustered index on more than one field? Is it possible?

The answer is yes and no.
You can create clustered index only one clustered index in table.
Either you can create index on entire table or you can create clustered index on a view covering entire table.
Suppose, you have created table with following:
CREATE TABLE [dbo].[Table1](
[field1] [int] IDENTITY(1,1) NOT NULL,
[field2] [nchar](10) ,
[field3] [nchar](10) ,
[field4] [nchar](10)
Create index on entire table:
CREATE INDEX idx_coverTable ON Table1(field1, field2) INCLUDE (field3, field4)
Create clustered index on a view covering entire table:
SELECT field1, field2, field3, field4 FROM dbo.Table1
CREATE UNIQUE CLUSTERED INDEX idx_viewClustered ON dbo.v1111(field1, field2, field3, field4)
GO (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend