Search for a column name in any table
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…
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…
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…
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…
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…