亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sp_cursor.sql

?? 關于Sql的一些命令的源代碼
?? SQL
字號:
sp_cursoropen
Defines the attributes of an API server cursor, such as its scrolling behavior and the statement used to build the result set on which the cursor operates, then populates the cursor. The statement can contain embedded parameters.

Syntax
sp_cursoropen [@cursor =] cursor_handle OUTPUT,
    [@stmt =] 'stmt'
    [, [@scrollopt =] scroll_options OUTPUT]
    [, [@ccopt =] concurrency_options OUTPUT]
    [, [@rowcount =] rowcount OUTPUT]

[
    {, [@paramdef =] N'parameter_name data_type [,...n]' }
    {, [@param1 =] value1 [,...n] }

]

Arguments
[@cursor =] cursor_handle OUTPUT 
Is the name of a declared integer variable to receive the cursor handle. cursor_handle is int, with no default. 
[@stmt =] 'stmt' 
Is a string containing a single SELECT statement or a single stored procedure call. The size of the string is limited only by available database server memory. stmt can contain parameters having the same form as a variable name, for example:

'SELECT * FROM Employees WHERE EmployeeID = @IDParameter'

Each parameter included in stmt must have a corresponding entry in both the @paramdef parameter definition list and the parameter values list.

[@scrollopt =] scroll_options OUTPUT 
Is the cursor scroll type. scroll_options is int with a default of 1 (keyset-driven), and can be a combination of these values (exactly one of the first 5 must be specified).

Value Description 
0x0001 Keyset-driven cursor. 
0x0002 Dynamic cursor. 
0x0004 Forward-only cursor. 
0x0008 Static cursor. 
0x0010 Fast forward-only cursor. 
0x1000 Parameterized query. 
0x2000 Auto fetch. 
0x4000 Auto close. 
0x8000 Check acceptable types. 
0x10000 Keyset-driven acceptable. 
0x20000 Dynamic acceptable. 
0x40000 Forward-only acceptable. 
0x80000 Static acceptable. 
0x100000 Fast forward-only acceptable. 

On return, @scrollopt contains the type of cursor actually created, which may not match what was requested. 
[@ccopt =] concurrency_options OUTPUT 
Is the cursor concurrency. concurrency_options is int, with a default of 4 (optimistic) and can be a combination of these values (exactly one of the first 4 must be specified).

Value Description 
0x0001 Read-only. 
0x0002 Scroll locks. 
0x0004 Optimistic. 
0x0008 Optimistic w/ checksum values (?). 
0x2000 Open on any SQL. 
0x4000 Update keyset in place. 
0x10000 Read-only acceptable. 
0x20000 Locks acceptable. 
0x40000 Optimistic acceptable. 

On return, @ccopt contains the type of cursor actually created, which may not match what was requested. 
[@rowcount =] rowcount OUTPUT 
Is the name of a declared integer variable to receive the number of affected rows. rowcount is int with no default value. 
[@paramdef =] N'parameter_name data_type [,...n]' 
Is one string that contains the definitions of all parameters that have been embedded in stmt. Each parameter definition consists of a parameter name and a data type. n is a placeholder indicating additional parameter definitions. Every parameter specified in stmt must be defined in @paramdef. If the Transact-SQL statement in stmt does not contain parameters, @paramdef is not needed. The default value for this parameter is NULL. 
[@param1 =] value1 
Is a value for the first parameter defined in the parameter string. The value can be a constant or a variable. There must be a parameter value supplied for every parameter included in stmt. The values are not needed if the Transact-SQL statement in stmt has no parameters. 
n 
Is a placeholder for the values of additional parameters. Values can be only constants or variables. Values cannot be more complex expressions such as functions, or expressions built using operators. 
Return Code Values
0 (success) or 1 (failure).

Result Sets
Returns the result set generated by stmt, but containing no rows.

Remarks
sp_cursoropen is a more powerful (and programmatic) way of creating server-side cursors on SQL Server.

Permissions
Execute permissions default to the public role.

Examples
A. Create a cursor for a simple SELECT statement
This simple example creates a dynamic read-only cursor for a SELECT statement with no parameters.

USE pubs

 

-- Create a dynamc read-only cursor

DECLARE @cursor INT

EXEC sp_cursoropen @cursor OUTPUT, N'SELECT * FROM myTable', 2, 8193

 

-- Close the cursor

EXEC sp_cursorclose @cursor

 

B. Create a cursor for a parameterized SELECT statement
This example creates a dynamic read-only cursor for a SELECT statement with 2 parameters.

USE pubs

 

-- Create a dynamc read-only cursor

DECLARE @cursor INT

EXEC sp_cursoropen @cursor OUTPUT, N'SELECT * FROM myTable WHERE col1=@P1 AND col2 LIKE @P2', 2, 8193, N'@P1 INT, @P2 VARCHAR(255)', 10, '%x%' 

 

-- Close the cursor

EXEC sp_cursorclose @cursor

 

C. Create a cursor for a stored procedure call
This example creates a dynamic read-only cursor for a stored procedure with 2 parameters (the procedure must return only one result set or the cursor creation will fail). Note that output parameters can also be used and return values retrieved via output parameters.

USE pubs

 

-- Create a dynamc read-only cursor

DECLARE @cursor INT

DECLARE @retval INT

EXEC sp_cursoropen @cursor OUTPUT, 'EXEC @P1=myProc @P2', 2, 8193, N'@P1 INT OUTPUT, @P2 INT', @retval, 1

 

-- Close the cursor

EXEC sp_cursorclose @cursor

 

sp_cursorfetch
Fetches a row or block of rows from an API server cursor.

Syntax
sp_cursorfetch [@cursor =] cursor_handle
    [, [@fetchtype =] fetchtype]
    [, [@rownum =] rownum OUTPUT]
    [, [@nrows =] nrows OUTPUT]

Arguments
[@cursor =] cursor_handle 
Is the cursor handle. cursor_handle is int, with no default. 
[@fetchtype =] fetchtype 
Is the fetch type. fetchtype is int, with a default of 2 and can have one of these values.

Value Description 
0x0001 First row. 
0x0002 Next row. 
0x0004 Previous row. 
0x0008 Last row. 
0x0010 Absolute row index. 
0x0020 Relative row index. 
0x0040 By value (???). 
0x0080 Refresh. 
0x0100 Result set info. 
0x0200 Previous noadjust (?). 
0x0400 Skip update concurrency (???). 

[@rownum =] rownum OUTPUT 
Is the row number. rownum is int, with a default of NULL. 
[@nrows =] nrows OUTPUT 
Is the number of rows to fetch. nrows is int, with a default of NULL (fetch all rows). 
Return Code Values
0 (success) or 1 (failure).

Result Sets
Returns the requested row or group of rows from the cursor.

Remarks
In addition to fetching rows, the 'result set info' fetch type can be used to retrieve information about the cursor (current row in @rownum and total number of rows in @nrows).

Permissions
Execute permissions default to the public role.

Example
USE pubs

 

-- Create a dynamc read-only cursor 

DECLARE @cursor INT

EXEC sp_cursoropen @cursor OUTPUT, 'SELECT * FROM myTable', 2, 8193

 

-- Fetch the next 3 lines

EXEC sp_cursorfetch @cursor, 2, 0, 3

 

-- Close the cursor

EXEC sp_cursorclose @cursor

 

sp_cursorclose
Closes ande deallocates an API server cursor.

Syntax
sp_cursorclose [@cursor =] cursor_handle

Arguments
[@cursor =] cursor_handle 
Is a cursor handle obtained by calling sp_cursorcreate. cursor_handle is int, with no default. 
Return Code Values
0 (success) or 1 (failure).

Result Sets
None.

Permissions
Execute permissions default to the public role.

Example
USE pubs

 

-- Create a dynamic read-only cursor 

DECLARE @cursor INT

EXEC sp_cursoropen @cursor OUTPUT, 'SELECT * FROM myTable', 2, 8193

 

-- Close the cursor

EXEC sp_cursorclose @cursor

 

sp_cursoroption
Sets various options for API server cursors.

Syntax
sp_cursorclose [@cursor =] cursor_handle,
    [@code =] code,
    { [@value =] value
    | [@cursorname =] cursorname }

Arguments
[@cursor =] cursor_handle 
Is a cursor handle obtained by calling sp_cursorcreate. cursor_handle is int, with no default. 
[@code =] code 
Is the option code. code is int, with no default and can be one of these values.

Value Description 
1 ??? 
2 Set cursor name. 

[@value =] value 
Is the value of the selected option. value is int, with no default. 
[@cursorname =] cursorname 
Is the name of the cursor. cursorname is sysname, with no default. 
Return Code Values
0 (success) or 1 (failure).

Result Sets
None.

Permissions
Execute permissions default to the public role.

Example
USE pubs

 

-- Create a dynamc cursor 

DECLARE @cursor INT

EXEC sp_cursoropen @cursor OUTPUT, 'SELECT * FROM myTable', 2, 8193

 

-- Name the cursor

EXEC sp_cursoroption @cursor, 2, 'myCursor'

 

-- Use a cursor variable to access the cursor

DECLARE @x CURSOR

EXEC sp_describe_cursor @x out, N'global', 'myCursor'

FETCH NEXT FROM @x

 

-- Use the cursor directly by name

FETCH NEXT FROM myCursor

 

-- Close the cursor

EXEC sp_cursorclose @cursor

 

sp_cursor
Can be used to request inserts and positioned updates or deletes on API server cursors.

Syntax
sp_cursor [@cursor =] cursor_handle,
    [@optype =] optype,
    [@rownum =] rownum,
    [@table =] 'table'
    {, [@param1 =] value1 [,...n] } 

Arguments
[@cursor =] cursor_handle 
Is a cursor handle obtained by calling sp_cursorcreate. cursor_handle is int, with no default. 
[@optype =] optype 
Is a the operation to perform. optype is int, with no default and can be one of these values.

Value Description 
1 Update row (?). 
4 Insert row. 
33 Update row. 
34 Delete row. 
40 提取當前頁的行

[@rownum =] rownum 
Is the number of the row to update in the fetch cache. rownum is int, with no default. 
[@table =] 'table' 
Is the name of the table to update (an empty character string seems to be ok). table is sysname, with no default. 
Return Code Values
0 (success) or 1 (failure).

Result Sets
None.

Permissions
Execute permissions default to the public role.

Example
USE pubs

 

-- Create a dynamc cursor 

DECLARE @cursor INT

EXEC sp_cursoropen @cursor OUTPUT, 'SELECT * FROM myTable', 2, 8193

 

-- Fetch the next 2 lines; this puts lines 1 and 2 in the fetch buffer

EXEC sp_cursorfetch @cursor, 2, 0, 2

 

-- Update the second line in the fetch buffer

EXEC sp_cursor @cursor, 33, 2, '', @intCol=5, @charCol='x'

 

-- Close the cursor

EXEC sp_cursorclose @cursor

 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久婷婷国产综合精品电影| 91国产福利在线| 石原莉奈在线亚洲三区| 亚洲激情成人在线| 一区二区三区电影在线播| 亚洲欧美日韩一区| 最新中文字幕一区二区三区| 自拍偷自拍亚洲精品播放| 亚洲天堂精品视频| 亚洲成a人片在线观看中文| 亚洲妇女屁股眼交7| 偷拍亚洲欧洲综合| 久久国产精品99精品国产| 国模无码大尺度一区二区三区| 国产乱子轮精品视频| 成人激情免费网站| 欧美撒尿777hd撒尿| 欧美一区二区三区人| 久久久久久久久久久久久夜| 亚洲欧洲国产日本综合| 亚洲一区二区三区不卡国产欧美| 午夜亚洲福利老司机| 老司机精品视频导航| 国产91在线|亚洲| 在线观看www91| 日韩精品一区二区三区视频| 国产日韩高清在线| 亚洲精品国产品国语在线app| 亚洲高清视频在线| 国产精品99久久久久久久女警| eeuss鲁一区二区三区| 欧美日韩三级一区二区| 久久久久久麻豆| 亚洲一区欧美一区| 国产一区欧美日韩| 欧美日韩在线播放三区四区| 国产色产综合色产在线视频| 亚洲综合久久久| 国产精品一区免费在线观看| 欧美三级午夜理伦三级中视频| 久久久久99精品一区| 亚洲第一狼人社区| 99久久精品久久久久久清纯| 91精品欧美福利在线观看| 亚洲欧洲精品天堂一级| 久久99国产乱子伦精品免费| 欧美一区二区三级| 亚洲精品国产成人久久av盗摄 | 成人性视频免费网站| 欧美一区二区三区在线电影 | 欧美日韩国产免费| 国产精品电影院| 国产一区二区成人久久免费影院 | 不卡av电影在线播放| 日韩久久免费av| 亚洲国产精品自拍| 色综合久久六月婷婷中文字幕| 久久色.com| 理论电影国产精品| 日韩午夜激情电影| 水蜜桃久久夜色精品一区的特点| 97精品国产97久久久久久久久久久久| 日韩三级中文字幕| 日韩高清在线不卡| 欧美二区乱c少妇| 夜夜操天天操亚洲| 91久久国产最好的精华液| 欧美国产一区二区在线观看| 国产精品1区二区.| 精品88久久久久88久久久| 日本女人一区二区三区| 91精品国产综合久久久久久漫画| 亚洲品质自拍视频网站| caoporn国产精品| 亚洲天天做日日做天天谢日日欢| av激情综合网| 夜夜嗨av一区二区三区网页| 欧美写真视频网站| 亚洲成av人片一区二区三区| 欧美男生操女生| 久久电影国产免费久久电影| 精品久久久久久久久久久久包黑料 | 日韩成人一级大片| 日韩欧美一区二区免费| 韩国成人精品a∨在线观看| 久久久久久久久一| 成人精品电影在线观看| 亚洲欧美二区三区| 欧美日韩的一区二区| 久久电影网电视剧免费观看| 久久久久一区二区三区四区| 成人国产精品免费观看动漫| 亚洲欧美色一区| 欧美日韩精品福利| 狠狠色丁香婷婷综合| 亚洲国产高清aⅴ视频| 91网站最新地址| 日韩精品一级中文字幕精品视频免费观看 | 中文字幕在线不卡视频| 91久久国产综合久久| 首页欧美精品中文字幕| 久久久一区二区三区捆绑**| 99久久久精品| 成人激情视频网站| 天堂成人免费av电影一区| 精品久久久久一区二区国产| 99热精品国产| 男人的天堂久久精品| 亚洲国产精品精华液ab| 宅男噜噜噜66一区二区66| 国产成人午夜精品5599| 亚洲一区二区在线免费观看视频 | 不卡一区二区在线| 亚洲国产综合视频在线观看| 久久综合色婷婷| 欧美丝袜自拍制服另类| 国产成人综合在线| 日本欧美久久久久免费播放网| 国产精品视频一二三区| 91精品国产综合久久久久久久久久 | 久久精品国产一区二区三| 中文字幕日韩欧美一区二区三区| 日韩一区二区在线看| 91黄色免费版| 国产成人精品一区二| 91亚洲精品久久久蜜桃| 日韩国产在线一| 一区二区三区中文在线观看| 日本一区二区免费在线观看视频 | 久久精品水蜜桃av综合天堂| 欧美日本一区二区三区四区| 91啪在线观看| 从欧美一区二区三区| 国产做a爰片久久毛片| 日韩高清不卡一区二区| 一区二区三区在线视频观看| 国产清纯白嫩初高生在线观看91 | 国产精品影视在线| 青青草国产成人99久久| 亚洲第一在线综合网站| 一区二区三区视频在线看| 国产精品嫩草影院av蜜臀| 久久久久久一级片| 久久婷婷国产综合精品青草| 精品成人一区二区三区四区| 欧美一级生活片| 欧美成va人片在线观看| 欧美一级xxx| 欧美精品色综合| 欧美高清一级片在线| 欧美高清性hdvideosex| 717成人午夜免费福利电影| 欧美日韩国产免费| 欧美一区二区三区色| 日韩欧美一二区| 亚洲精品一线二线三线| 久久久精品国产99久久精品芒果| 欧美mv日韩mv| 国产欧美精品一区| 亚洲欧美视频在线观看视频| 亚洲精品中文在线影院| 亚洲6080在线| 久久99精品一区二区三区三区| 激情综合网av| 波多野结衣中文字幕一区二区三区| 国产1区2区3区精品美女| 99精品视频一区| 欧洲一区二区三区免费视频| 在线综合亚洲欧美在线视频| 精品成人a区在线观看| 欧美激情一区二区三区蜜桃视频| 日日夜夜免费精品视频| 日韩高清在线不卡| 国产成a人亚洲| 在线看不卡av| 久久这里都是精品| 日韩毛片精品高清免费| 五月婷婷久久综合| 黄色精品一二区| 在线一区二区观看| 精品国产伦一区二区三区观看方式| 中文字幕乱码日本亚洲一区二区| 中文字幕一区免费在线观看| 日韩精品免费视频人成| 国产不卡一区视频| 欧美日韩日日夜夜| 国产精品美女久久久久av爽李琼| 亚洲一区二区三区视频在线播放 | 中文字幕欧美国产| 偷窥少妇高潮呻吟av久久免费| 韩日av一区二区| 欧美丝袜第三区| 国产欧美一区二区三区鸳鸯浴| 亚洲一级二级三级在线免费观看| 精品影院一区二区久久久| 91国在线观看| 国产精品无遮挡| 国产在线国偷精品免费看| 欧美日韩久久一区二区| 一色桃子久久精品亚洲|