【SQL开源代码栏目提醒】:网学会员在SQL开源代码频道为大家收集整理了331.sql提供大家参考,希望对大家有所帮助!
use db_
sql declare cur_emp scroll cursor /*创建游标*/
for select * from tb_employee06
where 性别 ='女' /*定义游标结果集*/
open cur_emp /*打开游标*/
print '女员工的记录共有'+cast(@@cursor_rows as varchar(4))
/*输出语句*/
close cur_emp /*关闭游标*/
select * from tb_employee06 where 性别 ='女'