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
How can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role?
List out some of the requirements to set up a sql server failover cluster?
What is the difference between varchar and varchar(max) datatypes?
What is the difference between function and stored procedure in sql server?
How to resolve the orphan use problem? : sql server security
How to change the ownership of a schema in ms sql server?
Explain powershell included in sql server 2008?
Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?
How many types of keys are there?
What is query parameter in ssrs?
How to add code to the existing article (using improve article)?
How to get the definition of a user defined function back?
What is use of attribute hierarchy ordered ? : sql server analysis services, ssas
Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?
What is SQL Server?