It is a stored memory area where the result set store, and we can navigate the result set we can read one by one row from result set]
Based on the operations there are 2 types of cursors
Position cursor are updatable cursor
Non – position cursor is read-only
We can declare a cursor
Inclined to build a profession as Teradata Developer? Then here is the blog post on, explore Teradata Training
Cursor declaration is generally in two ways
The scope of the cursor is within the for loop only
The scope of the cursor is between the begin and END statement only
It is 5 steps process
Ex: If the cursor is not open, but we are trying to close the cursor at that time the SQL code is 7362
Create procedure SP3()
Begin
Declare var1 integer;
Declare var2 character(30);
Declare C1 cursor For Select party id, party name from party ORDER By party id;
Open C1;
While(SQL Code=o)DO Fetch C1 into var1, var2;
Insert into party1(Party id, party name) values(var1, var2);
End while Close cd;
End;
Call SP3()
Select* From party1;
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.