Link to home
Start Free TrialLog in
Avatar of Chuckbuchan
Chuckbuchan

asked on

Fetch [ SQL]

I would like to get a good grasp of using Fetch keyword in SQL.
I have read about it on the internet,but still not clear.
Any simple and clear explanation will be appreciated.

thanks
SOLUTION
Avatar of Paul Maker
Paul Maker
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Chuckbuchan
Chuckbuchan

ASKER

I have seen those links a moment ago, the explanation is not simple.
are you just curious or do you think you need to use FETCH to solve a specific problem.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would like to know it in advance, I need it later when I write T-SQL for some specific tasks. If I manage to get a grasp of it, I will not have to waste time to ask for each specif task next time.

Well ,do your best to explain it, I am raising the points now.
thanks
Like in what circumstances can I use fetch with cursor, can I use fetch only on the server or on the client application also?
in what circumstances can I use Fetch with: Next,Prior,first,last,absolute,relative,global,cursor name,cursor variable name,into.

some simple and clear explanation with an example for each parameter would be helpful.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To Subhasree :
When it's recommended or preferable to use the Fetch?
for example when writing a program with VB or VB.net ?
OR

when writing Stored Procedure, triggers?


thanks



Hi,
Sorry for the delayed reply.

You can use this FETCH statement in a Stored preocedure. It is always recommended to do maximum part of data processing in the Backend(SQL Server) and send just the result recordset /values to the frontends like VB/VB.NET