See the most recently updated stored procs, tables & views
This group of similar queries return the object name, creation date and last modified date of various objects in the database.
This group of similar queries return the object name, creation date and last modified date of various objects in the database.
Sometimes you need to search for a stored procedures without knowing its exact name, or to find all of the procedures that begin with a certain naming prefix. Tables that follow a particular naming convention can be found by searching…
Typically I want to find text somewhere in a table or a stored procedure. There are plugins that exist to help you search — but in a pinch you can search the database manually too. Find text referenced in any…
Most directly, you can run this in SQL Server to confirm that a column exists — but that alone is only somewhat useful. Really what you want to know is both that the column exists and the table it lives…
This comes in handy if you need to create an idempotent scripts. For example, a script to create your database’s tables (or other entities) might check for their existence before attempting to create them. Note that the above DROP TABLE…
The idea here is sort of like creating a table based on a SELECT statement, but I think SQL’s syntax is a little counterintuitive. Here’s the crown jewel: And here’s how we might use it in practice:
To use a variable in a WHERE clause, you can concatenate the multicharacter wildcard operator % or the single character wildcard _ onto the variable to perform a fuzzy match. Here’s an example of it in use:
Welcome to SQLStrong, a site dedicated to the study of databases and database technology, emerging technologies like GraphQL, and, of course, SQL. Here’s a story about why I decided to start this blog. My name is Eric. I’ve worked in…