Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

select all columns except one sql

/* Get the data into a temp table */
SELECT * INTO #TempTable
FROM YourTable
/* Drop the columns that are not needed */
ALTER TABLE #TempTable
DROP COLUMN ColumnToDrop
/* Get results and drop temp table */
SELECT * FROM #TempTable
DROP TABLE #TempTable
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #columns #sql
ADD COMMENT
Topic
Name
6+6 =