Example :
CREATE TABLE Top_Clause
(
id INT IDENTITY(1, 1),
name VARCHAR(10),
gender CHAR(1) DEFAULT 'M'
)
INSERT INTO Top_Clause
SELECT 'Satya',
'M'
UNION ALL
SELECT 'Naga',
'M'
UNION ALL
SELECT 'Venkat',
'M'
UNION ALL
SELECT 'Krishna',
'M'
UNION ALL
SELECT 'Reeta',
'F'
UNION ALL
SELECT 'Meeta',
'F'
UNION ALL
SELECT 'Geetha',
'F'
UNION ALL
SELECT 'Heetha',
'F'
-- Fetching 3 records using TOP clause
SELECT TOP 3 *
FROM Top_Clause
-- Updating top 3 records using Top clause
UPDATE TOP (3) Top_Clause
SET name = name + '3'
-- Deleting top 3 records using Top clause
DELETE TOP (3) FROM Top_Clause