Home > Database > Mysql Tutorial > body text

SQL 必知必会笔记19使用游标

WBOY
Release: 2016-06-07 17:38:37
Original
1029 people have browsed it

游标(cursor)是一个存储在DBMS服务器上的数据库查询,它不是一条SELECT语句,而是被该语句检索出来的结果集。在存储了游标之后,应用程序可以根据需要滚动或浏览其中的数据。 使用游标 使用游标的步骤: 1. 创建游标 在SQL Server中使用DECLARE命名游标,

游标(cursor)是一个存储在DBMS服务器上的数据库查询,它不是一条SELECT语句,而是被该语句检索出来的结果集。在存储了游标之后,,应用程序可以根据需要滚动或浏览其中的数据。

使用游标

使用游标的步骤:

 

1. 创建游标

在SQL Server中使用DECLARE命名游标,并定义相应的SELECT语句,根据需要带WHERE和其他子句,示例如下:

Customers

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!