Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to display n-1 columns from n number of columns, from a
single table in MS SQL server 2005?

Answer Posted / k m rajesh

Declare @ColumnName Varchar(50)
Select @ColumnName = Name From syscolumns Where id = object_id(Table_Name) and ColID = (Select Count(name)-1 from SysColumns Where id = object_id(Table_Name))

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role?

1080


List out some of the requirements to set up a sql server failover cluster?

1074


What is the difference between varchar and varchar(max) datatypes?

1133


What is the difference between function and stored procedure in sql server?

1150


How to resolve the orphan use problem? : sql server security

1071


How to change the ownership of a schema in ms sql server?

1256


Explain powershell included in sql server 2008?

1114


Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?

1006


How many types of keys are there?

1073


What is query parameter in ssrs?

166


How to add code to the existing article (using improve article)?

1163


How to get the definition of a user defined function back?

1084


What is use of attribute hierarchy ordered ? : sql server analysis services, ssas

1053


Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?

1030


What is SQL Server?

1269