Little SQL Server Tricks: Rename Default Constraints

One would assume that renaming a default constraint should work the same way as renaming a primary key. For some unknown reason that was not the case as I had to fix the (dynamically generated) names of default constraints. The format that worked at last was this one:

Without the N in front of …

Read more

Little SQL Server Tricks: Use Underline Characters With Like

I needed to find all columns with an underscore (_) in their name and came up with this query:

But instead of showing me columns with a _ in their name, I got every column back that exists in my database. When I replace _ with anything else, I got the expected result. What …

Read more

Learn SQL at the SQL Zoo

Of all the (programming) languages you can learn, I think SQL is the one that will help you the most throughout your career as a software developer. If you know the basics of SQL, you can solve set based problems directly in your database without writing a ton of code to do the same in …

Read more