Hi @Gund, Ramesh GRV ,
Agree with Tom. >There is no way to leave the header and remove the ---- between header and data.
But I found a stupid method that you can try, which is to print the column name plus the -h -1 option.
In your sql script you can add statements as follows.
A simple example:
USE AdventureWorksLT2017
GO
SET NOCOUNT ON
print 'ProductID | Name | ProductNumber| Color | StandardCost | ListPrice | Size | Weight | ProductCategoryID | ProductModelID | SellStartDate | SellEndDate | DiscontinuedDate | ThumbNailPhoto | ThumbnailPhotoFileName | rowguid | ModifiedDate'
select top 10 * from SalesLT.Product
Best regards,
Seeya
If the response is helpful, please click "Accept Answer" and upvote it.
