Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

We need to perform what steps in the following order to work with a cursor?

Answer Posted / Mukul Kumar

To work with a cursor in SQL Server, you must follow these steps:
1. Declare the cursor using the DECLARE statement.
2. Open the cursor using the OPEN statement.
3. Fetch rows from the cursor using the FETCH statement.
4. Optionally, perform operations on the fetched row(s).
5. Close the cursor using the CLOSE statement.
6. Deallocate the cursor using the DEALLOCATE statement.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

1118


What is normalization and what are the advantages of it?

1042


What is temporary table in sql server? Why we use temp table?

1001


Why we use the openxml clause?

1059


What is the difference between for xml raw and for xml auto?

1095


How do I start sql server 2017?

1001


What is a scheduled job or what is a scheduled task?

1022


How do I find the sql server version?

1096


Can we shrink data file in sql server?

1112


Is it possible to have clustered index on separate drive from original table location?

1026


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

2545


Disadvantages of the indexes?

1207


Does view occupy space?

999


Equi join and non equi join is possible with sql server?

1112


What is subquery? Explain the properties of a subquery?

1046