Web DeveloperSubscribe Now


Due to the way that Amazon RDS is setup, it doesn't allow you to GRANT ALL PRIVILEGES ON *.* Here is a workaround to get the same permissions:   … [Read more]

A Better Git Log

I've always been kind of frustrated with the standard implementation of the git log.  It seems like I always find myself using third party tools when wanting to view the history in git. This is an alias that you can use to create a pretty git log … [Read more]

Force MySQL Group By to function like SQL Server

Note: MySQL has now made this enabled by default starting in MySQL 5.7.5! Should've happened a really long time ago, but hey, better late than never! MySQL's group by functionality allows you to not group by all relevant columns. If you're not … [Read more]

Preview Inserts, Updates, Deletes, and Merges in SQL Server

With the complex and convoluted database structures out there in the wild in corporate America, often times you run into statements that could scare you half to death. This is especially true when dealing with Inserts, Updates, Deletes and … [Read more]

Example of Transactions in SQL Server

Here is a quick example of a transaction in SQL Server. This is done so that if there is an error, it will undo any changes that it made. You'll notice that I'm setting XACT_ABORT to 'ON'. When SET XACT_ABORT is ON, if a Transact-SQL statement … [Read more]

Sending SMTP Email in C#

If you're needing to connect to an SMTP server from within your C# to send emails, here is some example code of how to do that. This example sends an email with a display name that is passed to the method, technically if you wanted you could also … [Read more]

Using OUTPUT Clause to return inserted identity value (or any inserted value) in SQL Server

I recently came across a bug in SQL Server 2008 that can cause the SCOPE_IDENTITY() Function to return an incorrect value for the recently inserted row if the query has a parallel execution plan.  While SCOPE_IDENTITY() is generally a pretty safe way … [Read more]