-- Collection of code snippets by Arne Vajhøj 
-- (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
SELECT @@VERSION
GO

CREATE TABLE test (txt VARCHAR(25) NOT NULL PRIMARY KEY)
GO
INSERT INTO test VALUES('Alfa')
GO
INSERT INTO test VALUES('Beta')
GO
INSERT INTO test VALUES('Charlie')
GO
INSERT INTO test VALUES('Delta')
GO

SELECT * FROM test WHERE txt BETWEEN 'B' AND 'C'
GO
SELECT * FROM test WHERE txt BETWEEN 'B' AND 'D'
GO

DROP TABLE test
GO
