Reputation: 402
I'm new in Oracle database. What I need is equivalent query in Oracle like this example from SQL Server (reading results in Management Studio). On Oracle side, I'm using Golden6 from Benthic Software.
declare @n integer
set @n = 100;
select * from table where id >= @n and id <= @n + 50
Thank you.
Upvotes: 1
Views: 554
Reputation: 121902
Try this one -
CREATE TABLE tbl (ID NUMBER);
INSERT INTO tbl VALUES (100);
INSERT INTO tbl VALUES (10);
DEFINE n = 100;
SELECT *
FROM tbl
WHERE id BETWEEN &n AND &n + 50;
You can try to run this script in dbForge Studio for Oracle (trial or free express version).
Upvotes: 1