Tally Tables in T-SQL
The Tally (or Numbers) table is one of the most useful constructs in intermediate-level SQL. Have you ever written a...
2014-03-27
56,317 reads
The Tally (or Numbers) table is one of the most useful constructs in intermediate-level SQL. Have you ever written a...
2014-03-27
56,317 reads
In today’s blog I will attempt to challenge the popularly held notion that LIKE “%string%” wildcard searches must be slow...
2014-03-26
20,688 reads
In SQL Server 2005, Microsoft introduced the Common Table Expression (CTE). CTEs share similarities with VIEWS and derived tables, but...
2014-03-23
1,601 reads
If you learn one new T-SQL (i.e., Microsoft SQL Server) concept today it should be ROW_NUMBER(). Introduced in SQL 2005,...
2014-03-22
2,961 reads
When you've got only a single effective date on a record and you need to artificially create the effective end date based on a following row in T-SQL, the techniques discussed in this article will help you decide what is best.
2014-03-18
33,576 reads
Follow along as this starter article on the SQL TABLE Type walks you through the various ways it can be used in T-SQL.
2014-03-03
9,947 reads
2014-01-09
2,340 reads
A way to assign variable and overrideable defaults to input parameters to an SP or FUNCTION using a configurations table.
2013-09-03
8,342 reads
2013-09-03
2,455 reads
The SQL MERGE statement can make your DML querying more efficient but you need to take care or you may get burned
2013-04-03
24,504 reads
By Steve Jones
Today Redgate announced that we are partnering with Bregal Sagemount, a growth-focused private equity...
By Steve Jones
I used Claude to build an application that loaded data for me. However, there...
End-to-end NVMe vs PVSCSI testing over NVMe/TCP to a Pure Storage FlashArray: TPC-C and...
Good Evening, Is there a simpler way to rearrange the following WHERE condition: [Column_1]...
Comments posted to this topic are about the item Which Table I
Comments posted to this topic are about the item Using Python notebooks to save...
I have this code in SQL Server 2022:
CREATE SCHEMA etl;
GO
CREATE TABLE etl.product
(
ProductID INT,
ProductName VARCHAR(100)
);
GO
INSERT etl.product
VALUES
(2, 'Bee AI Wearable');
GO
CREATE TABLE dbo.product
(
ProductID INT,
ProductName VARCHAR(100)
);
GO
INSERT dbo.product
VALUES
(1, 'Spiral College-ruled Notebook');
GO
CREATE OR ALTER PROCEDURE etl.GettheProduct
AS
BEGIN
SELECT ProductName
FROM product;
END;
GO
When I execute this code as a user whose default schema is dbo and has rights to the tables and proc, what is returned? See possible answers