I have a table with many columns, among which I would like to omit a few in my "select" query. Something like that select (* - columns_to_be_omitted) from myTable. Is there any way to do this other than listing all the other columns in the query?
select (* - columns_to_be_omitted) from myTable
This is a one-time manual request, so I'm not worried about performance. Ease of use is a big need here.
You cannot do this - it is best to use a tool such as SQL Prompt if you are using SQL Server Management Studio.
SQL Prompt SELECT * FROM MyTable, "*" , SQL Prompt , , . , , SELECT.
SELECT * FROM MyTable
, SSMS : - (
SQL. , , ( ), SQL .
, ( , ). MySQL .
, M $ IDE , intellisense... , 2008 , 2005 .
SQL Management Studio, script select to new query, , . .
:)
. , select, temprory, .
You can dynamically build a list of columns using a query on a data dictionary. Then you can add a list of unwanted columns to where-clause (e.g. column name not in ()). (Not sure how you could do this using the proc stored method that cletus suggested.)
Source: https://habr.com/ru/post/1722655/More articles:Is there a free program to monitor a C ++ application for memory leaks? - c ++Как установить альтернативный цвет строки в flex datagrid? - flexHow to get the corresponding file extension if the mimeType file type is known - javaWhat is the difference between GROUP BY and DISTINCT? - sqlCustomize UISlider color in iPhone app - iphoneProblem with Wpf Background Panel - eventsHow to automate perl script in Delphi? - perlInput Controls on the ASP.NET MVC Home Page - asp.net-mvchow to do parallel work in python - pythonBluetooth on Lazarus / FreePascal on Mac OS X - delphiAll Articles