sql declare cursor

Read about sql declare cursor, The latest news, videos, and discussion topics about sql declare cursor from alibabacloud.com

Oracle database PL/SQL stored procedure cursor trigger

then close C;end if;end;Create a function--Create a function that can remove the space of the string create or Replace function Noblank1 (str varchar) return Varcharisbeginreturn replace (str, ', '); end ;--Call function Select Noblank1 (' DFA D s a ') from dual;Create a Trigger--Creating a trigger create or replace trigger Stu_update_tribefore update on Studentfor each rowbegindbms_output.put_line (' A record has been updated, the original data is ' | |:o ld.age| | ' The new data is ' | |:new.

SQL temp table or table variable substitution cursor

1. If the table does not have an auto-growing identity column (int) using the temp tableSELECT IDENTITY (int) NewID,.. Into #tmp from youtable2. Tables with identity columns using table variablesINSERT into @tmpTableSELECT ..., NewID= (SELECT COUNT (*) from youtable b WHERE b.aidWhen you have a continuous newid from 1 to ~d, you can use loops to manipulate each record.This newid you can do when it is pointer identification.If you do not understand ~ ~ View the following stored procedures/** * *

Total Pages: 11 1 .... 7 8 9 10 11 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.