2011-03-22
3,563 reads
2011-03-22
3,563 reads
Dynamic SQL allows stored procedures to “write” or dynamically generate their SQL statements. The most common use case for dynamic SQL is stored procedures with optional parameters in the WHERE clause. These are typically called from reports or screens that have multiple, optional search criteria. This article describes how to write these types of stored procedures so they execute well and resist SQL injection attacks.
2011-03-22
7,301 reads
2011-03-21
3,062 reads
2011-03-18
3,044 reads
2011-03-16
3,164 reads
SQLs CASE expressions can be powerful magic, but can trap the unwary that are used to the more familiar CASE statements of procedural languages.
2011-03-14
6,011 reads
2011-03-11
2,645 reads
The UNION, EXCEPT and INTERSECT operators of SQL enable you to combine more than one SELECT statement to form a single result set. Rob Sheldon explains all, with plenty of examples.
2011-03-10
6,323 reads
Learn how you can query a hierarchy of data and also return the results in an ordered fashion. A handy T-SQL skill that you will use over and over again.
2024-08-02 (first published: 2011-03-10)
24,191 reads
2011-03-08
2,587 reads
By Steve Jones
“Don’t aim to have others like you; aim to have them respect you.” –...
Many years ago, before I joined Oracle, I was working on a major modernisation...
If you work with data pipelines, SQL, notebooks, or machine learning models, a Mac...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
WhatsApp:0821-8154-398 Jl. KH. Wahid Hasyim No.20, Jombang, Kec. Jombang, Kabupaten Jombang, Jawa Timur 61415...
WhatsApp:0821-8154-398 9G9F+FFC, Jl. Jend. Sudirman No.79-81, Kejuron, Kec. Taman, Kota Madiun, Jawa Timur 63132...
In SQL Server 2025, I have a table (dbo.UserPermission) that contains this data:
UserID UserPermissions 15 23 37What is returned when I run this code:
select bit_count(UserPermissions) as PermissionCount from dbo.UserPermission where UserID = 3;See possible answers