DECLARE @total_col VARCHAR(MAX) DECLARE @result NVARCHAR(MAX) SET @total_col='' SELECT @total_col = @total_col + QUOTENAME(item) + ',' FROM items SET @result=LEFT(@total_col, (LEN(@total_col)-1)) ...
What is a Computed Column? A Computed Column is a column whose values are derived or computed by an expression. The expression might be a constant, function or combination of values from one or more ...
Developers love database programming tips, tricks, and workarounds—especially those that slash development time or boost application performance. Here's a collection of such nuggets for developing SQL ...
SQL Server Management Studio (SSMS) is the principal interface for working with Microsoft SQL Server. However, many subtleties of this powerful tool evade even the most seasoned professionals. Here ...
I know in Oracle you can use DBA_TAB_COLUMNS (or ALL_TAB_COLUMNS). My SQL Server knowledge is very rusty, but can't you use the INFORMATION_SCHEMA.COLUMNS view?