Using Toad to operate Oracle

Source: Internet
Author: User

The Toad for Oracle tool was used in further projects. It was easy to use. Although there were too many things stacked on the interface, it felt a little messy, but it was actually quite helpful.

After logging on to the database, you can use the Schema Browser button to View information about the database, such as Table, View, Fuction, Procedure, and Package.

I tried to write the function in it and found that the function can only be written in the corresponding function. The package is also a bit awkward. But it's okay to get used to it.

Some test code (simple, only test Toad ):

1. ---- create a function
CREATE OR REPLACE FUNCTION SYSTEM.pan_func(name number) RETURN NUMBER ISpanno NUMBER;BEGIN   --panno := 0;   select seq into panno from help where seq=name;         RETURN panno;   EXCEPTION     WHEN NO_DATA_FOUND THEN       NULL;     WHEN OTHERS THEN       -- Consider logging the error and then re-raise       RAISE;END pan_func;/
2. ---- create a package
Create or replace package system. pan_package is procedure pan_procedure1 (name number); function pan_func1 (name number) return number; end ;/-- The following is the body.Create or replace package body SYSTEM. pan_package is procedure pan_procedure1 (name number) is begin update help set info ='Jiuuu'Where seq = name; end; function pan_func1 (name number) return number is haisa number; begin select seq into haisa from help where seq = name; return haisa; end; END;-- Pan_package;/

Related Article

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.