September 28, 2020
  • 5:49 am Cách cài Win từ ổ cứng: cả Win 7/8/8.1 và Win10 (làm mẫu với Win 10)
  • 2:47 am [Topgame] Top 9 game bắn súng online miễn phí hay nhất đầu 2018 | Android-IOS
  • 8:03 pm Hướng dẫn tạo chú thích footnote trong Word | How to Insert Footnote in Word
  • 7:26 am Cách chèn nhạc vào ảnh và video trên Facebook
  • 6:59 am Tóm Tắt The Walking Dead (Xác Sống) | Season 4



In this tutorial, you’ll learn the difference between delete/drop and truncate.

PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation’s procedural extension for SQL and the Oracle relational database. PL/SQL is available in Oracle Database (since version 7), TimesTen in-memory database (since version 11.2.1), and IBM DB2 (since version 9.7).[1] Oracle Corporation usually extends PL/SQL functionality with each successive release of the Oracle Database.

PL/SQL includes procedural language elements such as conditions and loops. It allows declaration of constants and variables, procedures and functions, types and variables of those types, and triggers. It can handle exceptions (runtime errors). Arrays are supported involving the use of PL/SQL collections. Implementations from version 8 of Oracle Database onwards have included features associated with object-orientation. One can create PL/SQL units such as procedures, functions, packages, types, and triggers, which are stored in the database for reuse by applications that use any of the Oracle Database programmatic interfaces.

PL/SQL works analogously to the embedded procedural languages associated with other relational databases. For example, Sybase ASE and Microsoft SQL Server have Transact-SQL, PostgreSQL has PL/pgSQL (which emulates PL/SQL to an extent), and IBM DB2 includes SQL Procedural Language,[2] which conforms to the ISO SQL’s SQL/PSM standard.

The designers of PL/SQL modeled its syntax on that of Ada. Both Ada and PL/SQL have Pascal as a common ancestor, and so PL/SQL also resembles Pascal in several aspects. However, the structure of a PL/SQL package does not resemble the basic Object Pascal program structure as implemented by a Borland Delphi or Free Pascal unit. Programmers can define public and private global data-types, constants and static variables in a PL/SQL package.[3]

PL/SQL also allows for the definition of classes and instantiating these as objects in PL/SQL code. This resembles usage in object-oriented programming languages like Object Pascal, C++ and Java. PL/SQL refers to a class as an “Abstract Data Type” (ADT) or “User Defined Type” (UDT), and defines it as an Oracle SQL data-type as opposed to a PL/SQL user-defined type, allowing its use in both the Oracle SQL Engine and the Oracle PL/SQL engine. The constructor and methods of an Abstract Data Type are written in PL/SQL. The resulting Abstract Data Type can operate as an object class in PL/SQL. Such objects can also persist as column values in Oracle database tables.

PL/SQL is fundamentally distinct from Transact-SQL, despite superficial similarities. Porting code from one to the other usually involves non-trivial work, not only due to the differences in the feature sets of the two languages,[4] but also due to the very significant differences in the way Oracle and SQL Server deal with concurrency and locking. There are software tools available that claim to facilitate porting including Oracle Translation Scratch Editor,[5] CEITON MSSQL/Oracle Compiler [6] and SwisSQL.[7]

The StepSqlite product is a PL/SQL compiler for the popular small database SQLite.
PL/SQL Program Unit

A PL/SQL program unit is one of the following: PL/SQL anonymous block, procedure, function, package specification, package body, trigger, type specification, type body, library. Program units are the PL/SQL source code that is compiled, developed and ultimately executed on the database.

The basic unit of a PL/SQL source program is the block, which groups together related declarations and statements. A PL/SQL block is defined by the keywords DECLARE, BEGIN, EXCEPTION, and END. These keywords divide the block into a declarative part, an executable part, and an exception-handling part. The declaration section is optional and may be used to define and initialize constants and variables. If a variable is not initialized then it defaults to NULL value. The optional exception-handling part is used to handle run time errors. Only the executable part is required. A block can have a label.

Package

Packages are groups of conceptually linked functions, procedures, variables, PL/SQL table and record TYPE statements, constants, cursors etc. The use of packages promotes re-use of code. Packages are composed of the package specification and an optional package body. The specification is the interface to the application; it declares the types, variables, constants, exceptions, cursors, and subprograms available. The body fully defines cursors and subprograms, and so implements the specification. Two advantages of packages are:

Modular approach, encapsulation/hiding of business logic, security, performance improvement, re-usability. They support object-oriented programming features like function overloading and encapsulation.
Using package variables one can declare session level (scoped) variables, since variables declared in the package specification have a session scope.

Nguồn: https://chaoticpharmacology.com/

Xem thêm bài viết khác: https://chaoticpharmacology.com/cong-nghe/

admin

RELATED ARTICLES

39 COMMENTS

  1. kuldeep singh Posted on July 8, 2020 at 10:57 pm

    Loved the content😊….thank you ma'am.

    Reply
  2. Lakshmi Reddy Posted on July 8, 2020 at 10:57 pm

    WEll done

    Reply
  3. dsbs 551551 Posted on July 8, 2020 at 10:57 pm

    Hi can you share how create index video

    Reply
  4. Rupali Hajare Posted on July 8, 2020 at 10:57 pm

    Very easy explanation

    Reply
  5. Gloria Lois Posted on July 8, 2020 at 10:57 pm

    Great tutorial, thank you

    Reply
  6. Sonali Shelar Posted on July 8, 2020 at 10:57 pm

    In wamp there is MySQL Console..rollback cmd is not work..

    Reply
  7. Sonali Shelar Posted on July 8, 2020 at 10:57 pm

    Easily understand 😄

    Reply
  8. GOPAL MALUPULA Posted on July 8, 2020 at 10:57 pm

    Return drop the table.
    Flashback table tablename to before drop.

    Reply
  9. GOPAL MALUPULA Posted on July 8, 2020 at 10:57 pm

    Is it possible return drop the table

    Reply
  10. atul baghresh Posted on July 8, 2020 at 10:57 pm

    Thanku mam ☺

    Reply
  11. Ibrahim Xakkie Posted on July 8, 2020 at 10:57 pm

    lecturer is very nice but please in starting portion …their is enough and their is lot of thing u tell. so please trim all this

    Reply
  12. Chaitanya kumar Reddy Posted on July 8, 2020 at 10:57 pm

    firstly i created a view table using emp with as command.
    then i deleted viewtable, it deleted my original emp table.
    i closed sql and again connected to scott the emp table has no rows. i used rollback no use,flashback no use,nothing in recyclebin. my emp was lost what should i do to get back my EMP table. PLZ

    Reply
  13. Pasha Tyulnev Posted on July 8, 2020 at 10:57 pm

    only people from india write that its easy to understand xD

    Reply
  14. anna kozin Posted on July 8, 2020 at 10:57 pm

    Thanks a lot! But PLEASE make an effort to speak in english!

    Reply
  15. Pavan Kakarla Posted on July 8, 2020 at 10:57 pm

    lot of love and respect..!!!!

    Reply
  16. Balakrishna mokashi Posted on July 8, 2020 at 10:57 pm

    is 'rollback' works after drop table?

    Reply
  17. Sushant Kumar Posted on July 8, 2020 at 10:57 pm

    superb and thanku

    Reply
  18. mohit verma Posted on July 8, 2020 at 10:57 pm

    This is very helpful mam thanks a lot.

    Reply
  19. sanjeeb amat Posted on July 8, 2020 at 10:57 pm

    nice explanation !!!

    Reply
  20. chennareddy mitta Posted on July 8, 2020 at 10:57 pm

    Mam please tell me when I truncate the whole table ?Can I get the table back again from the database

    Reply
  21. Vandana Ludhani Posted on July 8, 2020 at 10:57 pm

    nice explanation. i learnt many small but imp things in SQL AND PL/ SQL from yu. THANKS

    Reply
  22. Mazhar Imam Khan Posted on July 8, 2020 at 10:57 pm

    Very well explained and elaborated. Thanks a lot..

    Reply
  23. jpatidar Posted on July 8, 2020 at 10:57 pm

    thanks mam very useful

    Reply
  24. sagar pahuja Posted on July 8, 2020 at 10:57 pm

    Maam could you please give me the link of that software…that version oracle 12c is not working in my laptop

    Reply
  25. harish KS Posted on July 8, 2020 at 10:57 pm

    Covered delete, truncate, drop, commit & rollback concepts. Really Good one. Thank you.

    Reply
  26. sandeep pilly Posted on July 8, 2020 at 10:57 pm

    great explanation loved it! 🙂

    Reply
  27. Ramakrishna Bhuma Posted on July 8, 2020 at 10:57 pm

    Good job!

    Reply
  28. Suresh Kesari Posted on July 8, 2020 at 10:57 pm

    tqu mam ,

    Reply
  29. Chaitanya o.v.s Posted on July 8, 2020 at 10:57 pm

    nice explanation mam,thank u

    Reply
  30. Raj Kurakula Posted on July 8, 2020 at 10:57 pm

    very good explanation radhika,keep it up

    Reply
  31. Kalyan Ch Posted on July 8, 2020 at 10:57 pm

    Easy to understand and very good explication…Simply superb..

    Reply
  32. Rishabh Jain Posted on July 8, 2020 at 10:57 pm

    Nice vdeo, I always got confused between the three.. it has optimal details not more or less.. Good one.

    Reply
LEAVE A COMMENT