Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
46 views

C# Quiz 7

Cursor allows applications to access and manipulate data row-by-row rather than operating on all rows at once. Using a cursor requires declaring, opening, fetching rows, processing rows, closing, and deallocating the cursor. Collation defines rules for sorting and comparing character data based on options like case sensitivity and accent marks. The main difference between functions and stored procedures is that user-defined functions can be used directly in SQL statements while stored procedures cannot and functions returning tables can be treated as rowsets and joined with other tables.

Uploaded by

dummy
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

C# Quiz 7

Cursor allows applications to access and manipulate data row-by-row rather than operating on all rows at once. Using a cursor requires declaring, opening, fetching rows, processing rows, closing, and deallocating the cursor. Collation defines rules for sorting and comparing character data based on options like case sensitivity and accent marks. The main difference between functions and stored procedures is that user-defined functions can be used directly in SQL statements while stored procedures cannot and functions returning tables can be treated as rowsets and joined with other tables.

Uploaded by

dummy
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

7. What is Cursor?

Cursor is a database object used by applications to manipulate data in a set on a row-by-


row basis, instead of the typical SQL commands that operate on all the rows in the set at one
time.

In order to work with a cursor we need to perform some steps in the following order:

1. Declare cursor
2. Open cursor
3. Fetch row from the cursor
4. Process fetched row
5. Close cursor
6. Deallocate cursor
8. What is Collation?
Collation refers to a set of rules that determine how data is sorted and compared. Character
data is sorted using rules that define the correct character sequence, with options for
specifying case sensitivity, accent marks, kana character types and character width.
9. What is Difference between Function and Stored Procedure?
UDF can be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section
where as Stored procedures cannot be. UDFs that return tables can be treated as another
rowset. This can be used in JOINs with other tables. Inline UDF's can be thought of as views
that take parameters and can be used in JOINs and other Rowset operations.

You might also like