SQL SERVER BLOGS
- General (9)
- Tables and columns (11)
- Selecting data (7)
- WHERE criteria (5)
- Calculations (7)
- Joins (3)
- Grouping (2)
- Views (2)
- Stored procedures (5)
- SQL programming (5)
- Programming tables (4)
- CTEs, subqueries (6)
- Errors, debugging (2)
- Functions (3)
- Dynamic SQL (3)
- Transactions (3)
- Cursors (1)
- Triggers (1)
BLOGS BY AUTHOR
BLOGS BY YEAR
Wise Owl Training - SQL blogs (page 1 of 4)
Showing blogs 1-20 (out of 65)
Posted by Andy Brown on 29 March 2019
Someone has finally won our competition to think of a better acronym for the order of keywords in SQL, we're pleased to announce.
Posted by Sam Lowrie on 21 June 2018
Learn how to MERGE rows from two tables into one combined table, and how to remove unwanted data from both tables.
Posted by Andy Brown on 16 February 2018
You can use the IIF function in SQL as an alternative to the CASE WHEN statement. We thought we would share this new (for us) discovery with the world!
Posted by Andy Brown on 23 November 2017
With SQL Server 2012 came the power not just to use pre-defined code snippets, but also to create your own - this blog explains how.
Posted by Andy Brown on 02 March 2017
When you are programming in SQL, you often have the choice of using table variables or temporary tables. This blog considers whether one method is substantially quicker than the other (spoiler alert: not really).
Posted by Andy Brown on 03 February 2017
Everyone has a favourite system stored procedure (you do, don't you?). But five? That's the subject of this blog, anyway.
Posted by Andy Brown on 01 February 2017
A blog setting out an approach to coding in SQL to ensure consistently high standards across your organisation.
Posted by Andy Brown on 16 January 2017
SQL Server 2012 saw the introduction of the T-SQL FORMAT function, making it easier to present dates nicely (no more remembering CONVERT arguments such as 103!). But is it too slow to be really useful? This blog aims to test this scientifically.
Posted by Andy Brown on 27 September 2016
If you want to group items in a SQL query, showing a comma-delimited list of ids for each, generating an XML file is not the obvious place to start - but it should be.
Posted by Andy Brown on 23 March 2016
It's only a small thing, but … this blog shows how you can click and drag with the ALT key held down, then type to apply a table alias to lots of tables simultaneously.
Posted by Andy Brown on 01 February 2016
CTEs (or Common Table Expressions) allow you to divide complicated queries up into two or more simple discrete tasks, as this blog explains.
Posted by Andy Brown on 01 February 2016
It's not often that this owl learns new things about SQL when giving a course, but when I do, I like to share my new knowledge! This blog shows a new way to create aliases for columns in SQL.
Posted by Andrew Gould on 09 June 2014
Using the Pivot operator in SQL Server allows you to create basic pivot tables from your query results. This blog teaches you how to create simple, static pivots, crosstab-style tables and exciting, dynamic pivot tables.
Posted by Andrew Gould on 27 November 2013
Triggers are special stored procedures that execute automatically in response to certain events in a database. This blog explains how to create three types of trigger in SQL Server: DML, DDL and Logon triggers.
Posted by Andrew Gould on 11 October 2013
This blog examines how to use Transactions in Microsoft SQL Server to allow you to control when data changes are committed to the database. You'll also discover how you can rollback transactions, effectively giving you the chance to undo changes to your data.
Posted by Andy Brown on 20 September 2013
SQL Server 2012 introduces new functions to find the previous or subsequent value for a row, without using a complicated self-join. This blog explains how to use LAG and LEAD, including partitioning row sets.
Posted by Andy Brown on 09 September 2013
Writing SQL in Management Studio could, Wise Owl feel, be made a little easier: here are 10 practical suggestions for how!
Posted by Andy Brown on 06 June 2013
This blog gives the low-down on how to start and use the debugger included in SQL Server Management Studio 2008 R2 and SSMS 2012.
Posted by Andrew Gould on 08 May 2013
This blog teaches you how to modify existing data in your database by either deleting records or updating them.
Posted by Andy Brown on 03 May 2013
You can use BEGIN TRY to trap errors from SQL Server 2005 onwards, and also raise your own errors using RAISERROR or THROW - this blog explains all!