Here are three methods of creating and working with temporary tables in Microsoft SQL Server: Method 1: Select Into This is a quick and dirty method to create a temporary table. Compared to the other methods, you do not have to define the column names. Just add the ‘into #temptablename’ at the end of the columns you [...]
Continue reading...Thursday, July 9, 2009
To include column headers when pasting or saving sql results in Microsoft SQL Server Management Studio you must make a change on the Options Panel: Open the Options panel in the menu bar Navigate to Query Results -> SQL Server -> Results to Grid Check “Include column headers when copying or saving the results.” This works for SQL Server [...]
Continue reading...Thursday, June 18, 2009
Creating a GUID in Microsoft SQL Server: select newid(); Creating a GUID in MYSQL: select uuid(); Why use a GUID as a primary key? The main reason is if you want to guarantee uniqueness between databases and servers. I have never been a fan of GUIDs. Especially when having to write sql statements for reports. They’re difficult to scan and [...]
Continue reading...
Friday, October 2, 2009
0 Comments