Saturday, November 7, 2009

How to find a particular row from a table (SQL Query)

Declare cursor on table ,after that open the cusor and
using "fetch" keyword to retrive any row ,remove the cursor explictly because it is stored in the memory for this use dellocate keyword

Declare fetch_row insensitive scroll cursor for select *
from tbl1 [for{readonly}]

open fetch_row

Fetch absolute 5 from fetch_row

Deallocate fetch_row

It will display 5th row of the tbl1

No comments:

Post a Comment