Simple examples of DDL, DML, DCL and TCL commands: SELECT, INSERT, CREATE, ALTER, GRANT, REVOKE, COMMIT, ROLLBACK and what each one does.
SQLAuthority News – Gandhinagar SQL Server User Group Meeting April 24, 2009 – Meeting Report
About 50 people came to the Gandhinagar SQL Server User Group Meeting on April 24, 2009 for query optimization tricks and my back to basics talk.
geometry STIntersection: Return the Shared Shape
geometry STIntersection returns the shared shape rather than only an intersection flag. I inspect its type and emptiness alongside its area. A shared edge has zero area but still contains points.
SQL SERVER – Solution to Puzzle – Shortest Code to Perform SSN Validation
My solution to Jacob Sebastian’s puzzle: the shortest T-SQL code for SSN validation that removes invalid SSN values and returns only the valid ones.
SQL SERVER – Introduction to SQL Server Encryption and Symmetric Key Encryption Tutorial with Script
SQL Server Encryption keeps stolen data unreadable. Learn the three level encryption hierarchy, then follow a symmetric key encryption tutorial with the script.
SQLAuthority News – Starting the SQL Journey – How Did I Get Started With SQL?
SQL Expert Jorge Segarra (@SQLChicken) tagged me with one question: how did I get started with SQL? Here is the story of my SQL journey.
SQL SERVER – List All the Tables for All Databases Using System Tables
A one line script with sp_msforeachdb and sys.tables to list all the tables for all databases on a server, updated with ideas from reader comments.
SQLAuthority News – Interview of Author on 60 Seconds with Pinal Dave
Vijaya Kadiyala interviewed me for his quick series 60 Seconds with Pinal Dave, about my MVP journey and summit experience. Read the interview on his blog.
SQL SERVER – Leading Zero to Number
Readers keep asking how to add a leading zero to a number. Here are my two earlier articles that pad a number with zeros for a fixed width display.
LAG IGNORE NULLS: Read the Previous Available Value
LAG IGNORE NULLS reads the previous non-NULL value within an ordered partition. These examples distinguish skipped rows, missing previous values and the supplied default.










