SSMS 2008 Select all Rows

Giganews Newsgroups
Subject: SSMS 2008 Select all Rows
Posted by:  James (wilja…@gmail.com)
Date: Wed, 15 Dec 2010

In SSMS 2008 when I right click a table in the object explorer and
select "select all rows", the script generated includes all the field
names in the query.

Example:

/****** Script for SelectTopNRows command from SSMS  ******/
SELECT [SalesOrderNo]
      ,[OrderDate]
      ,[OrderType]
      ,[OrderStatus]
      ,[ShipExpireDate]
      ,[CustomerNo]
      ,[BillToName]
      ,[BillToAddress1]
      ,[BillToAddress2]
      ,[BillToAddress3]
      ,[BillToCity]
      ,[BillToState]
      ,[BillToZipCode]
      ,[ShipToCode]
      ,[ShipToAddress1]
      ,[ShipToAddress2]
      ,[ShipToAddress3]
      ,[ShipToCity]
      ,[ShipToState]
      ,[ShipToZipCode]
      ,[ShipVia]
      ,[CustomerPoNo]
      ,[WareHouseCode]
      ,[ConfirmTo]
      ,[Comment]
      ,[TermsCode]
      ,[FaxNo]
      ,[EmailAddress]
      ,[SalesPersonNo]
      ,[NonTaxableAmt]
      ,[DateUpdated]
      ,[TimeUpdated]
  FROM [CandIParts].[dbo].[soMAS90_SO_SalesOrderHeader]

This takes up a lot of space in the query window and make it difficult
to see the query and table name.
It would be nice if there was an option to make the query look like
this:

Use CandIParts

Select * from soMAS90_SO_SalesOrderHeader

It seems like SSMS 2005 did it this way.

I have looked all over the options for a way to do this.  Any ideas?

Thank you,

Replies