Home
Search results “Each row trigger oracle”
PL/SQL: Triggers-Difference between Statement & Row level
 
06:14
In this tutorial , you'll know the difference between statement and row level triggers..
Views: 17382 radhikaravikumar
PLSQL Trigger, Row and Statement Level Trigger, How to Write Trigger in Oracle 11g Database
 
10:23
PLSQL Trigger, Row and Statement Level Trigger, How to Write Trigger in Oracle 11g Database PL-SQL tutorial for Beginners in Hindi and English
Before, After Insert or Update or Delete plsql trigger example.
 
23:16
A pl sql tutorial to understand Before, After Insert or Update or Delete trigger on table. This pl sql tutorial will give you a good concept of how to write pl sql triggers. Here is one example of the trigger create or replace trigger trigger_name before insert or update or delete on table_name for each row begin if inserting then dbms_output.put_line('Before inserting on table'); elsif updating then dbms_output.put_line('Before updating on table'); elsif deleting then dbms_output.put_line('Before deleting on table'); end if; end;
Views: 28304 Subhroneel Ganguly
:Old and :New value in pl sql triggers
 
15:31
A plsql tutorial about how to reference old and new column value of a table using :old or :new and how they are related to insert, update or delete dml transaction. Go through this oracle tutorial which will give you the concept about how to use :old and :new references. Here is the trigger example. create or replace trigger trigger_name before insert or update or delete on table_name for each row begin if inserting then dbms_output.put_line("Before inserting Old value is "||:old.column_name||" New value : "||:new.column_name); elsif updating then dbms_output.put_line("Before updating Old value is "||:old.column_name||" New value : "||:new.column_name); elsif deleting then dbms_output.put_line("Before deleting Old value is "||:old.column_name||" New value : "||:new.column_name); end if; end;
Views: 3820 Subhroneel Ganguly
SelectTec | Aula Nº 34 | Sequence/Trigger - autoincrement Oracle
 
08:50
Syntax: Criando a sequencia: CREATE SEQUENCE nome_da_sequencia minvalue 1 maxvalue 999 INCREMENT BY 1; Criando a trigger: CREATE OR REPLACE TRIGGER nome_TRIGGER BEFORE INSERT ON "tabela" FOR EACH ROW BEGIN SELECT "NOME_DA_SEQUENCIA".NEXTVAL INTO :new."CAMPO" FROM dual; END;
Views: 1603 SelectTec
Oracle PL/SQL Tutorials | Triggers in Oracle | by Mr.Vaman Deshmukh
 
22:21
Oracle PL/SQL Tutorials | Triggers in Oracle | by Mr.Vaman Deshmukh ** For Online Training Registration: https://goo.gl/r6kJbB ► Call: +91-8179191999 ► Visit Our Website for Classroom Training: https://nareshit.in ► For Online Training: https://nareshit.com/ #OraclePLSQLTutorials #TriggerinOracleTutorials #OracleTriggersTutorials -------------------------- ► About NareshIT: "Naresh IT is having 14+ years of experience in software training industry and the best Software Training Institute for online training, classroom training, weekend training, corporate training of Hadoop, Salesforce, AWS, DevOps, Spark, Data Science, Python, Tableau, RPA ,Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in USA,Hyderabad, Chennai and Vijayawada,Bangalore India which provides online training across all the locations -------------------------- ► Our Online Training Features: 1.Training with Real-Time Experts 2.Industry Specific Scenario’s 3.Flexible Timings 4.Soft Copy of Material 5. Share Videos of each and every session. -------------------------- Please write back to us at [email protected]/[email protected] or Call us at USA: +1404-232-9879 or India: +918179191999 ** Check The Below Links** ► For Course Reg: https://goo.gl/r6kJbB ► Subscribe to Our Channel: https://goo.gl/q9ozyG ► Circle us on G+: https://plus.google.com/NareshIT ► Like us on Facebook: https://www.facebook.com/NareshIT ► Follow us on Twitter: https://twitter.com/nareshitech ► Follow us on Linkedin: https://in.linkedin.com/company/naresh-i-technologies ► Follow us on Instagram: https://www.instagram.com/nareshitech/
Oracle PL/SQL Tutorials | Triggers in Oracle | by Mr.Vaman Deshmukh
 
23:21
Oracle PL/SQL Tutorials | Triggers in Oracle | by Mr.Vaman Deshmukh ** For Online Training Registration: https://goo.gl/r6kJbB ► Call: +91-8179191999 ► Visit Our Website for Classroom Training: https://nareshit.in ► For Online Training: https://nareshit.com/ #Oracle #PL_SQL #Tutorials | #Triggers in #Oracle | by Mr. #VamanDeshmukh -------------------------- ► About NareshIT: "Naresh IT is having 14+ years of experience in software training industry and the best Software Training Institute for online training, classroom training, weekend training, corporate training of Hadoop, Salesforce, AWS, DevOps, Spark, Data Science, Python, Tableau, RPA ,Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in USA,Hyderabad, Chennai and Vijayawada,Bangalore India which provides online training across all the locations -------------------------- ► Our Online Training Features: 1.Training with Real-Time Experts 2.Industry Specific Scenario’s 3.Flexible Timings 4.Soft Copy of Material 5. Share Videos of each and every session. -------------------------- Please write back to us at [email protected]/[email protected] or Call us at USA: +1404-232-9879 or India: +918179191999 ** Check The Below Links** ► For Course Reg: https://goo.gl/r6kJbB ► Subscribe to Our Channel: https://goo.gl/q9ozyG ► Circle us on G+: https://plus.google.com/NareshIT ► Like us on Facebook: https://www.facebook.com/NareshIT ► Follow us on Twitter: https://twitter.com/nareshitech ► Follow us on Linkedin: https://in.linkedin.com/company/naresh-i-technologies ► Follow us on Instagram: https://www.instagram.com/nareshitech/
Views: 2797 Naresh i Technologies
Oracle tutorial : How to create Id with AUTO INCREMENT in Oracle PL SQL
 
08:43
Oracle tutorial: How to create Id with AUTO INCREMENT in Oracle oracle tutorial for beginners sequence in oracle identity key in sql In this Oracle tutorial , we can create an auto increment field using ‘sequence’ object that can be assigned as primary keys. Using Oracle ‘sequence’ object, you can generate new values for a column. An Oracle sequence is an object like a table or a stored procedure. Examples CREATE SEQUENCE SYSTEM.MYSEQ START WITH 1 MAXVALUE 999999999999999999999999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER; CREATE OR REPLACE TRIGGER TR_CITY BEFORE INSERT ON CITY FOR EACH ROW BEGIN SELECT LPAD(LTRIM(RTRIM(TO_CHAR(myseq.NEXTVAL))),10,'0') INTO :NEW.id FROM DUAL; END; / Subscribe on youtube: https://www.youtube.com/channel/UCpiyAesWNYOXSz5GPq8lbkA For more tutorial please visit #techquerypond https://techquerypond.wordpress.com https://twitter.com/techquerypond identity column
Views: 8977 Tech Query Pond
PL SQL 6   Triggers
 
07:27
https://drive.google.com/file/d/0BxYoN5rLDBaRbFAxVTl6NFoyUzg/edit?usp=sharing Course Objectives Triggers. example 1 INSERT INTO student (student_id, salutation, first_name, last_name, zip, registration_date, created_by, created_date, modified_by, modified_date) VALUES (STUDENT_ID_SEQ.NEXTVAL, 'Mr.', 'Pedro', 'Perez', '00914', SYSDATE, USER, SYSDATE, USER, SYSDATE); --------------------- Example 2 CREATE OR REPLACE TRIGGER student_bi BEFORE INSERT ON student FOR EACH ROW DECLARE v_student_id STUDENT.STUDENT_ID%TYPE; BEGIN SELECT STUDENT_ID_SEQ.NEXTVAL INTO v_student_id FROM dual; :NEW.student_id := v_student_id; :NEW.created_by := USER; :NEW.created_date := SYSDATE; :NEW.modified_by := USER; :NEW.modified_date := SYSDATE; END; ----------------------- Example 3 INSERT INTO student (salutation, first_name, last_name, zip, registration_date) VALUES ('Mr.', 'Pedro', 'Perez', '00914', SYSDATE); ----------------------- Example 4 CREATE OR REPLACE TRIGGER instructor_aud AFTER UPDATE OR DELETE ON INSTRUCTOR DECLARE v_type VARCHAR2(10); BEGIN IF UPDATING THEN v_type := 'UPDATE'; ELSIF DELETING THEN v_type := 'DELETE'; END IF; INSERT INTO statistics VALUES ('INSTRUCTOR', v_type, USER, SYSDATE); END; ---------------------- Example 5 CREATE OR REPLACE TRIGGER instructor_biud BEFORE INSERT OR UPDATE OR DELETE ON INSTRUCTOR DECLARE v_day VARCHAR2(10); BEGIN v_day := RTRIM(TO_CHAR(SYSDATE, 'DAY')); IF v_day LIKE ('S%') THEN RAISE_APPLICATION_ERROR (-20000, 'Pas de modif. les weekends'); END IF; END; --------------------- Example 6 CREATE OR REPLACE TRIGGER student_compound FOR INSERT ON STUDENT COMPOUND TRIGGER v_day VARCHAR2(10); BEFORE STATEMENT IS BEGIN v_day := RTRIM(TO_CHAR(SYSDATE, 'DAY')); IF v_day LIKE ('S%') THEN RAISE_APPLICATION_ERROR (-20000, 'A table cannot be modified during off hours'); END IF; END BEFORE STATEMENT; BEFORE EACH ROW IS BEGIN :NEW.student_id := STUDENT_ID_SEQ.NEXTVAL; :NEW.created_by := USER; :NEW.created_date := SYSDATE; :NEW.modified_by := USER; :NEW.modified_date := SYSDATE; END BEFORE EACH ROW; END student_compound;
Views: 1022 Fdo Luis
PL/SQL: Mutating Triggers Part-1
 
06:24
In this tutorial, you'll learn... 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.
Views: 23419 radhikaravikumar
aula 2433 PL SQL TRIGGER de Linha FOR EACH ROW NEW
 
10:49
Aqui mais de 2.700 vídeo aulas no site www.informaticon.com.br.Desenvolvido pelo professor Neri Aldoir Neitzke, pós-graduado em Desenvolvimento para Web, professor e coordenador do curso de Sistemas de Informação da Universidade Ulbra e proprietário da Informaticon, email [email protected] 0xx543329-5400 Carazinho-RS Brasil Obs.: No youtube.com, as video aulas não estão nítidas e apenas a metade das vídeo aulas estão aqui. Caso queira, posso enviar um dvd com centenas de vídeo aulas originais com alta qualidade, e você ainda vai receber todo o código fonte.
Views: 6806 Neri Neitzke
PL/SQL tutorial 15: DML Trigger With Before Insert, Update and Delete DML Examples
 
09:17
PL/SQL Tutorial 15 explaining DML Trigger with examples such as Before Insert, Update and Delete in Detail. ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/dml-triggers Previous Tutorial ► Trigger Intro : https://youtu.be/R3fvX_xf5P4 ► SELECT-INTO : https://youtu.be/F5eMJhwmCQs ►IF-THEN-ELSIF: https://youtu.be/aW9XgUHSr0I ------------------------------------------------------------------------- ►►►Let's Get Free Uber Cab◄◄◄ Use Referral Code UberRebellionRider and get $20 free for your first ride. ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider https://www.facebook.com/imthebhardwaj http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ http://rebellionrider.tumblr.com/ http://www.pinterest.com/rebellionrider/ You can also Email me at for E-mail address please check About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 98840 Manish Sharma
MySQL Triggers
 
14:48
In this tutorial, I will teach you MySQL Triggers Website: http://codingpassiveincome.com It is MySQL Tutorial For Beginners. A SQL trigger is a set of SQL statements stored in the database catalog. A SQL trigger is executed or fired whenever an event that is associated with a table occurs. We set triggers for INSERT, UPDATE, DELETE MySQL Command. Each command can have BEFORE and AFTER triggers. In this tutorial, I will teach you How To Create MySQL Triggers. Subscribe: http://bit.ly/1VdATVr Blog: http://CodingPassiveIncome.com/blog Resources: http://CodingPassiveIncome.com/resources Facebook Community: http://on.fb.me/1nMGVC4 Facebook Fan Page: https://www.facebook.com/CodingPassiveIncome Twitter: https://twitter.com/SenaidBacinovic Voice Over Under - Kevin MacLeod (incompetech.com)
Views: 27266 Coding Passive Income
Oracle tutorial : Autonomous Transactions in Oracle 11g PL SQL-PRAGMA
 
10:40
Oracle tutorial : Autonomous Transactions in Oracle 11g PL SQL-PRAGMA What is pragma autonomous_transaction An autonomous transaction is an independent transaction to the main or parent transaction. If an Autonomous transaction is started by another transaction it is not nested, but independent of parent transaction. PRAGMA autonomous_transaction 1)In Oracle session, all of the changes made to data are part of a single transaction. 2)An autonomous transaction is an independent transaction started within another transaction (the main transaction). 3)Autonomous transactions allow you to temporarily suspend the main transaction, perform additional SQL operations, commit or rollback those operations separately, then resume the main transaction. 4)To define an autonomous transaction, we can use a PRAGMA statement PRAGMA AUTONOMOUS_TRANSACTION; CREATE TABLE log_data ( empno NUMBER(6), userid VARCHAR2(30), create_date DATE ); CREATE OR REPLACE TRIGGER add_log BEFORE INSERT OR UPDATE ON employee FOR EACH ROW DECLARE PRAGMA AUTONOMOUS_TRANSACTION; — This statement made this autonomous this trigger BEGIN INSERT INTO log_data VALUES (:new.id, USER, SYSDATE); COMMIT; END; / Insert into EMPLOYEE (ID, NAME, CITY, SALARY, DEPT_NO) Values (20, ‘MY Tech Query’, ‘Mumbai’, 20000, 1) ROLLBACK; SELECT * FROM EMPLOYEE SELECT * FROM LOG_DATA https://www.youtube.com/channel/UCpiyAesWNYOXSz5GPq8lbkA For more tutorial please visit #techquerypond https://techquerypond.com https://techquerypond.wordpress.com https://twitter.com/techquerypond oracle transaction pragma autonomous_transaction
Views: 2503 Tech Query Pond
Oracle tutorial : Global Temporary Table In Oracle PL SQL
 
08:49
Oracle tutorial : Global Temporary Table In Oracle PL SQL create temp table sql This video will explain to you how to create Temporary Tables in Oracle Oracle tutorial : Global Temporary Table In Oracle 1)The data in such a table is stored only as long as the session or transaction lasts and is private for each session. 2)The definition is visible to all sessions. 3)After commit or disconnection, the data is lost but the definition of the table remains. 4)Indexes created on a temporary. 5)Scope of TRUNCATE command is a single database session. There is no effect of TRUNCATE on other sessions. 6)Foreign key constraints are not applicable in case of Temporary tables 7)Temporary tables cannot contain column of persistent collection type Syntax : CREATE GLOBAL TEMPORARY TABLE table_name ( column_name column_data_type … … ) ON COMMIT DELETE ROWS; CREATE GLOBAL TEMPORARY TABLE Emp ( id number(5) NOT NULL, name varchar2(50) NOT NULL, city varchar2(50) NOT NULL ) ON COMMIT DELETE ROWS INSERT INTO Emp VALUES (1, ‘Test1’, ‘city1’); INSERT INTO Emp VALUES (2, ‘Test2’, ‘city2’); INSERT INTO Emp VALUES (3, ‘Test3’, ‘city3’); SELECT COUNT(*) FROM emp; Result = 3 rows COMMIT; SELECT COUNT(*) FROM emp; Result = 0 rows For more tutorial please visit #techquerypond https://techquerypond.com https://techquerypond.wordpress.com https://twitter.com/techquerypond oracle temporary table create temporary table sql temp table
Views: 3807 Tech Query Pond
81- Oracle PL/SQL Triggers (الجزء العملى)
 
41:32
by Mohamed El Desouki - محمد الدسوقى [email protected] Tel :00966 553450836 جامعة سلمان بن عبد العزيز - السعودية - الخرج Database 2 - Oracle PL/SQL Triggers in Arabic Text Book: Fundamentals of Database Systems, 5th Edition, by Elmasri/Navathe, published by Addison-W
PL/SQL: Mutating Triggers Part-2
 
08:41
In this tutorial, you'll learn... 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.
Views: 14115 radhikaravikumar
DML triggers in sql server   Part 43
 
17:45
In this video we will learn about triggers in sql serevr. There are 3 types of triggers 1. DML triggers 2. DDL triggers 3. Logon trigger DML triggers are fired automatically in response to DML events (INSERT, UPDATE & DELETE). DML triggers can be again classified into 2 types 1. After triggers (Sometimes called as FOR triggers) 2. Instead of triggers. After triggers, fires after the triggering action. The INSERT, UPDATE, and DELETE statements, causes an after trigger to fire after the respective statements complete execution. INSTEAD of triggers, fires instead of the triggering action. The INSERT, UPDATE, and DELETE statements, causes an INSTEAD OF trigger to fire INSTEAD OF the respective statement execution. Text version of the video http://csharp-video-tutorials.blogspot.com/2012/09/dml-triggers-part-43.html Slides http://csharp-video-tutorials.blogspot.com/2013/09/part-43-dml-triggers.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 349580 kudvenkat
Урок 37a. PL SQL. Триггеры уровня строки, использование for each row
 
08:24
Более подробно остановимся на триггерах уровня строки Триггер уровня строки срабатывает для каждой строки. Это могут быть BEFORE И AFTER
80- Oracle PL/SQL Triggers - (الجزء النظرى)
 
26:50
by Mohamed El Desouki - محمد الدسوقى [email protected] Tel :00966 553450836 جامعة سلمان بن عبد العزيز - السعودية - الخرج Database 2 - Oracle PL/SQL Triggers in Arabic Text Book: Fundamentals of Database Systems, 5th Edition, by Elmasri/Navathe, published by Addison-W
PL/SQL tutorial 17: Make synchronized backup copy of a table using DML Trigger
 
07:23
Learn how to make a synchronized backup copy of a table using DML Trigger in oracle database by Manish sharma RebellionRider ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/Synchronized-Table-backup-dml-trigger Previous Tutorial ► Giveaway announcement https://youtu.be/3vsPLcMsRwA ►Table Auditing using DML trigger https://youtu.be/i5fw-67P3XY ►Learn copy table with or without data using Create Table As http://bit.ly/create-table-as ------------------------------------------------------------------------- ►►►Let's Get Free Uber Cab◄◄◄ Use Referral Code UberRebellionRider and get $20 free for your first ride. ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider https://www.facebook.com/imthebhardwaj http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ http://rebellionrider.tumblr.com/ http://www.pinterest.com/rebellionrider/ You can also Email me at for E-mail address please check About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 41219 Manish Sharma
Audit table changes in sql server
 
06:45
sql server 2008 ddl trigger audit sql server table changes tracking In this video we will discuss, how to audit table changes in SQL Server using a DDL trigger. Table to store the audit data Create table TableChanges ( DatabaseName nvarchar(250), TableName nvarchar(250), EventType nvarchar(250), LoginName nvarchar(250), SQLCommand nvarchar(2500), AuditDateTime datetime ) Go The following trigger audits all table changes in all databases on a SQL Server. CREATE TRIGGER tr_AuditTableChanges ON ALL SERVER FOR CREATE_TABLE, ALTER_TABLE, DROP_TABLE AS BEGIN DECLARE @EventData XML SELECT @EventData = EVENTDATA() INSERT INTO SampleDB.dbo.TableChanges (DatabaseName, TableName, EventType, LoginName, SQLCommand, AuditDateTime) VALUES ( @EventData.value('(/EVENT_INSTANCE/DatabaseName)[1]', 'varchar(250)'), @EventData.value('(/EVENT_INSTANCE/ObjectName)[1]', 'varchar(250)'), @EventData.value('(/EVENT_INSTANCE/EventType)[1]', 'nvarchar(250)'), @EventData.value('(/EVENT_INSTANCE/LoginName)[1]', 'varchar(250)'), @EventData.value('(/EVENT_INSTANCE/TSQLCommand)[1]', 'nvarchar(2500)'), GetDate() ) END In the above example we are using EventData() function which returns event data in XML format. Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/audit-table-changes-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/audit-table-changes-in-sql-server_12.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html Full SQL Server Course https://www.youtube.com/playlist?list=PL4cyC4G0M1RQ_Rm52cQ4CcOJ_T_HXeMB4 All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 38819 kudvenkat
How to Fetch Latest record/row from the Table in Oracle Database
 
03:32
You will learn how to How to Fetch Latest record/row from the Table in Oracle Database. Realtime Scenario: This logic can be implemented to find whether the latest record should be inserted or updated to datawarehouse
SQL: Delete Vs Truncate Vs Drop
 
08:27
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.
Views: 61607 radhikaravikumar
PL/SQL tutorial 22: How To Create Instead-Of Insert Trigger in Oracle Database
 
08:06
Learn how to create Instead of Insert trigger in oracle database on the view by Manish Sharma RebellionRider.com ------------------------------------------------------------------------ ►►►LINKS◄◄◄ My New YouTube Channel ►► http://bit.ly/New-YT-Channel Blog: http://bit.ly/instead-of-insert-trigger Previous Tutorial ► SQL Tutorial 60 View: https://youtu.be/_T6vZVkWzQI ► Startup Trigger: https://youtu.be/UQtsKJ-MPyQ ------------------------------------------------------------------------- ►►►Let's Get Free Uber Cab◄◄◄ Use Referral Code UberRebellionRider and get $20 free for your first ride. ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider https://www.facebook.com/imthebhardwaj http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ http://rebellionrider.tumblr.com/ http://www.pinterest.com/rebellionrider/ ___Facebook Official Page___ https://www.facebook.com/RebellionRider.official/ You can also Email me at for E-mail address please check About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 32449 Manish Sharma
PL/SQL tutorial 16: Table Auditing using DML Triggers in Oracle PL/SQL
 
09:55
Learn Table Auditing using DML Triggers in Oracle Database and Increase the level of security by keep an eye on user tempering your table data. ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/table-auditing Previous Tutorial ► DML Triggers with Examples https://youtu.be/-OR7zLzCh_I ► Select-Into Statement: https://youtu.be/F5eMJhwmCQs ►Sysdate Blog : http://bit.ly/sysdate-in-oracle-by-rebellionrider ------------------------------------------------------------------------- ►►►Let's Get Free Uber Cab◄◄◄ Use Referral Code UberRebellionRider and get $20 free for your first ride. ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider https://www.facebook.com/imthebhardwaj http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ http://rebellionrider.tumblr.com/ http://www.pinterest.com/rebellionrider/ You can also Email me at for E-mail address please check About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 67854 Manish Sharma
SQL Tutorial - 13: Inserting Data Into a Table From Another Table
 
07:00
In this tutorial we'll learn to use the INSERT Query to copy data from one table into another.
Views: 241191 The Bad Tutorials
SQL query to find first record and last record in single query
 
08:55
SQL query to find first record and last record in single query
Views: 8132 SQL Guru
SQL script to insert into many to many table
 
14:52
Text Article http://csharp-video-tutorials.blogspot.com/2017/02/sql-script-to-insert-into-many-to-many.html Slides http://csharp-video-tutorials.blogspot.com/2017/02/sql-script-to-insert-into-many-to-many_6.html SQL Server Interview Questions and Answers text articles & slides http://csharp-video-tutorials.blogspot.com/2014/05/sql-server-interview-questions-and.html SQL Server Interview Questions and Answers playlist https://www.youtube.com/playlist?list=PL6n9fhu94yhXcztdLO7i6mdyaegC8CJwR All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists In this video we will discuss how to insert data into a table that has many-to-many relationship Create table Students ( Id int primary key identity, StudentName nvarchar(50) ) Go Create table Courses ( Id int primary key identity, CourseName nvarchar(50) ) Go Create table StudentCourses ( StudentId int not null foreign key references Students(Id), CourseId int not null foreign key references Courses(Id) ) Go Students - Id column is identity column Courses - Id column is identity column StudentCourses - StudentId and CourseId columns are foreign keys referencing Id column in Students and Courses tables As you can see, StudentCourses is a bridge table that has many to many relationship with Students and Courses tables. This means a given student can be enrolled into many courses and a given course can have many students enrolled. Below is the question asked in an interview for SQL Server Developer role. Write a SQL script to insert data into StudentCourses table. Here are the rules that your script should follow. 1. There will be 2 inputs for the script Student Name - The name of the student who wants to enroll into a course Course Name - The name of the course the student wants to enroll into 2. If the student is already in the Students table, then use that existing Student Id. If the student is not already in the Students table, then a row for that student must be inserted into the Students table, and use that new student id. 3. Along the same lines, if the course is already in the Courses table, then use that existing Course Id. If the course is not already in the Courses table, then a row for that course must be inserted into the Courses table, and use that new course id. 4. There should be no duplicate student course enrollments, i.e a given student must not be enrolled in the same course twice. For example, Tom must not be enrolled in C# course twice. Answer : To avoid duplicate student course enrollments create a composite primary key on StudentId and CourseId columns in StudentCourses table. With this composite primary key in place, if someone tries to enroll the same student in the same course again we get violation of primary key constraint error. Alter table StudentCourses Add Constraint PK_StudentCourses Primary Key Clustered (CourseId, StudentId) Here is the SQL script that inserts data into the 3 tables as expected Declare @StudentName nvarchar(50) = 'Sam' Declare @CourseName nvarchar(50) = 'SQL Server' Declare @StudentId int Declare @CourseId int -- If the student already exists, use the existing student ID Select @StudentId = Id from Students where StudentName = @StudentName -- If the course already exists, use the existing course ID Select @CourseId = Id from Courses where CourseName = @CourseName -- If the student does not exist in the Students table If (@StudentId is null) Begin -- Insert the student Insert into Students values(@StudentName) -- Get the Id of the student Select @StudentId = SCOPE_IDENTITY() End -- If the course does not exist in the Courses table If (@CourseId is null) Begin -- Insert the course Insert into Courses values(@CourseName) -- Get the Id of the course Select @CourseId = SCOPE_IDENTITY() End -- Insert StudentId & CourseId in StudentCourses table Insert into StudentCourses values(@StudentId, @CourseId) If required, we can very easily convert this into a stored procedure as shown below. Create procedure spInsertIntoStudentCourses @StudentName nvarchar(50), @CourseName nvarchar(50) as Begin Declare @StudentId int Declare @CourseId int Select @StudentId = Id from Students where StudentName = @StudentName Select @CourseId = Id from Courses where CourseName = @CourseName If (@StudentId is null) Begin Insert into Students values(@StudentName) Select @StudentId = SCOPE_IDENTITY() End If (@CourseId is null) Begin Insert into Courses values(@CourseName) Select @CourseId = SCOPE_IDENTITY() End Insert into StudentCourses values(@StudentId, @CourseId) End Use the following statement to execute the stored procedure Execute spInsertIntoStudentCourses 'Tom','C#'
Views: 77138 kudvenkat
Oracle Difference between Statement level and Row Level Trigger Session 3
 
02:54
Oracle SQL PLSQL and Unix Shell Scripting
Views: 739 Sridhar Raghavan
Video on using triggers
 
14:40
Video by Jose Risi on how to use triggers to update table.
Views: 11069 JoseFromAmerica
Part 4   Delete duplicate rows in sql
 
03:26
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/05/part-4-delete-duplicate-rows-in-sql.html In this video, we will discuss deleting all duplicate rows except one from a sql server table. SQL Script to create Employees table Create table Employees ( ID int, FirstName nvarchar(50), LastName nvarchar(50), Gender nvarchar(50), Salary int ) GO Insert into Employees values (1, 'Mark', 'Hastings', 'Male', 60000) Insert into Employees values (1, 'Mark', 'Hastings', 'Male', 60000) Insert into Employees values (1, 'Mark', 'Hastings', 'Male', 60000) Insert into Employees values (2, 'Mary', 'Lambeth', 'Female', 30000) Insert into Employees values (2, 'Mary', 'Lambeth', 'Female', 30000) Insert into Employees values (3, 'Ben', 'Hoskins', 'Male', 70000) Insert into Employees values (3, 'Ben', 'Hoskins', 'Male', 70000) Insert into Employees values (3, 'Ben', 'Hoskins', 'Male', 70000) The delete query should delete all duplicate rows except one. Here is the SQL query that does the job. PARTITION BY divides the query result set into partitions. WITH EmployeesCTE AS ( SELECT *, ROW_NUMBER()OVER(PARTITION BY ID ORDER BY ID) AS RowNumber FROM Employees ) DELETE FROM EmployeesCTE WHERE RowNumber ] 1
Views: 321189 kudvenkat
PLSQL: Triggers part-2 (statement level)
 
08:59
In this tutorial, you'll learn what are the type of triggers and statement level triggers..
Views: 28099 radhikaravikumar
Example, create and use triggers in MySQL
 
05:02
We can create a trigger user_trig in MySQL CREATE TRIGGER user_trig BEFORE INSERT ON users FOR EACH ROW INSERT INTO trigger_time VALUES(NOW()) When we execute an insert statement on users table, the trigger user_trig is executed and current time is inserted. Tables users and trigger_time are created as follows: CREATE TABLE users ( user_id varchar(45) NOT NULL, salary int NOT NULL DEFAULT 0, PRIMARY KEY (user_id) ) CREATE TABLE trigger_time ( exec_time datetime NOT NULL ) When we INSERT INTO users VALUES('jiansen',6000) In table trigger_time, we can see 2014-07-01 21:57:25 To see the triggers we created SHOW TRIGGERS; which is the same as SELECT * FROM information_schema.triggers; The trigger information is stored in triggers table in database information_schema To delete trigger user_trig DROP TRIGGER user_trig; More about this video: http://jiansenlu.blogspot.com/2014/07/example-create-and-use-triggers-in-mysql.html
Views: 75594 Jiansen Lu
Difference between Case and Decode
 
10:14
This video tutorial explains on how case statement and decode function are different from each other. Though both of them are used in giving the if-then-else conditional functionality to sql statement, they differ much from each other, this video will walk through each of the difference with appropriate examples. If you want more such videos of exciting and amazing 'difference between' concepts, check out the links below : char and varchar2 : https://youtu.be/039qzwjWf4k replace and translate : https://youtu.be/HKYF77BGzOE procedure and function : https://youtu.be/q3LmOenL120 in and exists : https://youtu.be/REX4IjRYlFw rank and dense_rank : https://youtu.be/WGSX998hZ9M delete and truncate : https://youtu.be/u76wMm2byXo %type and %rowtype : https://youtu.be/MlLUFeZ_3eM
Views: 11371 Kishan Mashru
UTL_FILE Package in Oracle PL/SQL | Oracle SQL Tutorial | Mr.Murali
 
41:39
UTL_FILE Package in Oracle PL/SQL | Oracle SQL Tutorial | Mr.Murali PL/SQL Tutorial for beginners ►For Registration : https://goo.gl/r6kJbB ►Call: +91-8179191999 ► Visit Our Website: http://nareshit.in/ http://nareshit.com/ ► About NareshIT: "Naresh IT is the Best Software Training Institute for Hadoop, Salesforce, AWS, DevOps, Sprak, Data Science, Python, Tableau, RPA ,Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in Hyderabad, Chennai and Vijayawada, India which provides online and classroom training classes" ►For Registration : https://goo.gl/r6kJbB ►Call: India- 8179191999, USA- 404-232-9879 Email: [email protected] ►Our Online Training Features: 1.Training with Real-Time Experts 2.Industry Specific Scenario’s 3.Flexible Timings 4.Soft Copy of Material 5.Share Video's of each and every session. Check The Below Links: ►For Course Reg : https://goo.gl/r6kJbB ► Subscribe to Our Channel: https://goo.gl/q9ozyG ► Circle us on G+: https://plus.google.com/NareshIT ► Like us on Facebook: https://www.facebook.com/NareshIT ► Follow us on Twitter: https://twitter.com/nareshitech ► Visit Our Website: http://nareshit.in/ http://nareshit.com/
Views: 6133 Naresh i Technologies
Top 30 PLSQL interview questions and answers
 
10:08
Most frequently asked questions: How to get distinct entries from the database? How to get results of any query which is sorted in any order? What is a mutating table error and how can you get around it? Describe the use of %ROWTYPE and %TYPE in PL/SQL What packages (if any) has Oracle provided for use by developers?Describe the use of PL/SQL tables When is a declare statement needed ? In what order should a open/fetch/loop set of commands in a PL/SQL block be implemented if you use the %NOTFOUND cursor variable in the exit when statement? Why? What are SQLCODE and SQLERRM and why are they important for PL/SQL developers? How can you find within a PL/SQL block, if a cursor is open? How can you generate debugging output from PL/SQL? What are the types of triggers? What are two parts of package ? what is the difference between to_char and to_date functions? How do you optimize SQL queries ? What are nested triggers ? What is a bitmap index? What is the usage of NVL? write a query for finding the length of the sting. please explain database architecture. How to get employee name from employee table which is the fifth highest salary of the table? Write a query to generate target column. Can we use out parameter in function? What will be the output for the below Query Select 'High' from dual where null = null; what is the difference between stored procedure and packaged procedure What are the steps you take to tune(performance tuning) the code in plsql? what is self join and how it works?? Can you alter procedure with in package? What is substr()&instr()? Difference between case and decode? Can you use sysdate in check constraints? If no, why? Difference between column level constraints & table level constraints? What is optimizer? What is nested_loop join? What is pivot operator? Tell me some oracle 10g features? What is m_view? What is master & detail tables? What is sqlcode and sqlerrm? Diff b/w procedure & packages? What are the dis_adv of packages? How to retrieve top 3 salaries from each departments? Can you update complex view? If no, why? When should rebuild one an index? Tell me some errors? Tell me some restrictions on cursor variables? What is context switching? What is bulk collect? What is nullif()? What is mutating error? What are the module's , you are working? Which will fire default first statement level or row level trigger? What is bulkcollect? And any restrictions in bulkcollect? What is the use of limit clause in bulkcollect? How to debugg your code? How to trace error handling? How to find which line error was raised? What are the methods there in save exceptions? What is functional based index? Write syntax? How to update complex view? Subscribe here : https://www.youtube.com/channel/UCofhGV_j_4cVGa9R08MsuXQ
Views: 8454 Oracle PL/SQL
83 - Oracle PL/SQL Triggers (نظرى - عملى)
 
01:08:24
by Mohamed El Desouki - محمد الدسوقى [email protected] Tel :00966 553450836 جامعة سلمان بن عبد العزيز - السعودية - الخرج Database 2 - Oracle PL/SQL Triggers in Arabic Text Book: Fundamentals of Database Systems, 5th Edition, by Elmasri/Navathe, published by Addison-W
UTL FILE READ DATA AND INSERT INTO TABLE WITHOUT SQLLOADER
 
09:06
Oracle SQL PLSQL and Unix Shell Scripting
Views: 3718 Sridhar Raghavan
create instead of insert trigger on view in plsql | Ten minute Code
 
09:19
1. conn hr/[email protected] 2.create or replace view dept_vu as select * from departments; / 3. select* from dept_vu 4. select * from departments 5. create or replace trigger dept_tri instead of insert on dept_vu for each row begin insert into departments values(:new.department_id,:new.department_name,:new.MANAGER_ID,:new.LOCATION_ID); end; / 6. insert into dept_vu values(310,'Admin-HR','',''); / insert into dept_vu values(320,'Admin-IT','',''); / insert into dept_vu values(330,'Admin-PR','',''); / insert into dept_vu values(340,'Admin-SL','',''); / insert into dept_vu values(350,'Admin-AC','',''); 7. select* from dept_vu 8. select * from departments fb:https://www.facebook.com/oraclesapdb fb group:https://www.facebook.com/groups/oraclesapbd/ blog site: http://oraclesapbd.blogspot.com/ twitter: https://twitter.com/oraclesapbd
Views: 151 10 Minute Code
File Browser Oracle APEX 18.1 - #37
 
11:45
Veremos nesse vídeo a implementação e configuração do item File Browser, que serve para fazer upload de arquivos do computador para o sistema. Query de criação da tabela que usei: CREATE TABLE "FUNCIONARIOS" ( "ID_FUNC" NUMBER NOT NULL ENABLE, "FUNCIONARIO" VARCHAR2(40) NOT NULL ENABLE, "MIME_TYPE" VARCHAR2(100), "FILENAME" VARCHAR2(100), "CHAR_SET" VARCHAR2(100), "LAST_UPDATE" DATE, "CONTENT" BLOB NOT NULL ENABLE, CONSTRAINT "FUNCIONARIOS_PK" PRIMARY KEY ("ID_FUNC") ENABLE ) / create sequence funcionarios_seq start with 1 increment by 1 nocache nomaxvalue / CREATE OR REPLACE TRIGGER "BI_FUNCIONARIOS" before insert on "FUNCIONARIOS" for each row begin if :NEW."ID_FUNC" is null then select "FUNCIONARIOS_SEQ".nextval into :NEW."ID_FUNC" from sys.dual; end if; end; / ALTER TRIGGER "BI_FUNCIONARIOS" ENABLE / #Oracle #APEX #OracleApex #ProgramarSemMedo #FileBrowser
Views: 109 Programar Sem Medo
SQL Complete Tutorial - ADD or SUBSTRACT or MULTIPLY between two columns - Chapter 6
 
03:47
In this video, I have explained how to add_subtract_multiply the two columns from the particular table. Comment - Follow - Like : https://www.facebook.com/TechyVickyBlog https://www.twitter.com/techyvicky https://www.pinterest.com/techyvicky/techy-vicky-blog https://plus.google.com/109896475845510580320/
Views: 31763 Vicky's Blog
How to Create | Alter Trigger in SQL Server
 
13:00
How to Create | Alter Trigger in SQL Server In this tutorial, we will learn Trigger in SQL Server, I have mentioned each to use trigger in SQL Server like Display Message and Also Use If Statement to Check the Column Values. You can watch the complete video tutorial, then you are able to do that. OnlineITtuts Tutorials cover many topics such as Web Designing, Web Development, Programming, Database, WordPress, Blogging, Google AdSense, Digital Marketing and TipsNTicks. I was made many videos for different categories, and I will share another helpful tutorial for different topics. Follow Us on Facebook www.facebook.com/onlineittuts.com Follow Us on Twitter www.twitter.com/onlineittuts.com Follow Us on Pinterest www.pinterest.com/onlineittuts.com Watch More Video Tutorials How to Download and Install SQL Server 2017 https://goo.gl/frvKEQ How to Insert Update Delete Stored Procedure in SQL Server https://goo.gl/KqkxRn You Can Watch More Videos C# Programming Tutorial For Beginners https://goo.gl/fRmi6B HTML5 Tutorial For Beginners https://goo.gl/yotvtD JavaScript Tutorial for Beginners with Examples https://goo.gl/sXnooR
Learn Oracle | How to Create a Trigger in PL SQL
 
05:39
Pebbles present, Learn Oracle 10g with Step By Step Video Tutorials. Learn Oracle 10g Tutorial series contains the following videos : Learn Oracle - History of Oracle Learn Oracle - What is Oracle - Why do we need Oracle Learn Oracle - What is a Database Learn Oracle - What is Grid Computing Learn Oracle - What is Normalization Learn Oracle - What is ORDBMS Learn Oracle - What is RDBMS Learn Oracle - Alias Names, Concatenation, Distinct Keyword Learn Oracle - Controlling and Managing User Access (Data Control Language) Learn Oracle - Introduction to SQL Learn Oracle - Oracle 10g New Data Types Learn Oracle - How to Alter a Table using SQL Learn Oracle - How to Create a Package in PL SQL Learn Oracle - How to Create a Report in SQL Plus Learn Oracle - How to Create a Table using SQL - Not Null, Unique Key, Primary Key Learn Oracle - How to Create a Table using SQL Learn Oracle - How to Create a Trigger in PL SQL Learn Oracle - How to Delete Data from a Table using SQL Learn Oracle - How to Drop and Truncate a Table using SQL Learn Oracle - How to Insert Data in a Table using SQL Learn Oracle - How to open ISQL Plus for the first time Learn Oracle - How to Open SQL Plus for the First Time Learn Oracle - How to Update a Table using SQL Learn Oracle - How to use Aggregate Functions in SQL Learn Oracle - How to use Functions in PL SQL Learn Oracle - How to use Group By, Having Clause in SQL Learn Oracle - How to Use Joins, Cross Join, Cartesian Product in SQL Learn Oracle - How to use Outer Joins (Left, Right, Full) in SQL Learn Oracle - How to use the Character Functions, Date Functions in SQL Learn Oracle - How to use the Merge Statement in SQL Learn Oracle - How to use the ORDER BY Clause with the Select Statement Learn Oracle - How to use the SELECT Statement Learn Oracle - How to use the Transactional Control Statements in SQL Learn Oracle - How to use PL SQL Learn Oracle - Data Types in PL SQL Learn Oracle - Exception Handling in PL SQL Learn Oracle - PL SQL Conditional Logics Learn Oracle - PL SQL Cursor Types - Explicit Cursor, Implicit Cursor Learn Oracle - PL SQL Loops Learn Oracle - Procedure Creation in PL SQL Learn Oracle - Select Statement with WHERE Cause Learn Oracle - SQL Operators and their Precedence Learn Oracle - Using Case Function, Decode Function in SQL Learn Oracle - Using Logical Operators in the WHERE Clause of the Select Statement Learn Oracle - Using Rollup Function, Cube Function Learn Oracle - Using Set Operators in SQL Learn Oracle - What are the Different SQL Data Types Learn Oracle - What are the different types of Databases Visit Pebbles Official Website - http://www.pebbles.in Subscribe to our Channel – https://www.youtube.com/channel/UCNNjWVsQqaMYccY044vtHJw?sub_confirmation=1 Engage with us on Facebook at https://www.facebook.com/PebblesChennai Please Like, Share, Comment & Subscribe
Views: 1266 Pebbles Tutorials
Язык SQL. SQL событие BEFORE или выполнение триггера перед выполнением SQL запроса
 
05:35
Рубрика SQLite на сайте: http://zametkinapolyah.ru/zametki-o-mysql/sqlite/ Текстовая версия: http://zametkinapolyah.ru/zametki-o-mysql/tema-13-triggery-v-sql-na-primere-bazy-dannyx-sqlite.html Паблик блога в ВК: https://vk.com/zametkinapolyah Тематическая группа в ВК: https://vk.com/zametki_bd Помощь проекту: WMR: R288272666982 WMZ: Z293550531456 Яндекс.Деньги: 410011531129223 -- SQL событие BEFORE -- В SQLite нет табличных триггеров, а есть только триггеры строчные, -- то есть FOR EACH ROW триггеры, которые срабатывают при изменении каждой строки в таблице. -- Давайте напишем триггер, который будет срабатывать -- при вставке данных в базу данных, до того, как будет выполнена операция вставки. -- Создадим две таблицы CREATE TABLE users( id INTEGER PRIMARY KEY, name TEXT NOT NULL, age INTEGER NOT NULL, address TEXT NOT NULL, mydate TEXT NOT NULL ); CREATE TABLE user_log ( Id_u INTEGER NOT NULL, u_date TEXT NOT NULL ); -- Для наполнения второй таблицы мы будем использовать триггер CREATE TRIGGER my_u_log BEFORE INSERT ON users BEGIN INSERT INTO user_log(id_u, u_date) VALUES (NEW.id, datetime('now')); END; -- Проверим работу триггера INSERT INTO users(name, age, address, mydate) VALUES ('Пупкин', 27, 'Адрес', datetime('now')); SELECT * FROM users; SELECT * FROM user_log; -- К сожалению, поле date в данном случае не показывает, что вставка данных в таблицу user_log произошла до того, как были вставлены данные в таблицу users. Но этот факт мы можем заметить по значению столбца id_u, которое равно -1, так как SQLite3 просто не знает: какое значение будет в столбце id таблицы users.
SQL AFTER INSERT Trigger Tutorial
 
04:55
A SQL tutorial for an AFTER INSERT trigger.
Views: 21253 Mathias Bording
SQLPLUS: LineSize & PageSize
 
03:49
In this tutorial, you'll learn how to set linesize and pagesize . 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.
Views: 16123 radhikaravikumar
PL/SQL: Cursors using FOR loop
 
05:10
In this tutorial, you'll learn h.ow to write a cursor using for loop and the advantage of it. 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.
Views: 17375 radhikaravikumar
Cursors in sql server   Part 63
 
13:58
Text version of the video http://csharp-video-tutorials.blogspot.com/2013/01/cursors-in-sql-server-part-63.html Slides http://csharp-video-tutorials.blogspot.com/2013/09/part-63-cursors-in-sql-server.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists Relational Database Management Systems, including sql server are very good at handling data in SETS. For example, the following "UPDATE" query, updates a set of rows that matches the condition in the "WHERE" clause at the same time. Update tblProductSales Set UnitPrice = 50 where ProductId = 101 However, if there is ever a need to process the rows, on a row-by-row basis, then cursors are your choice. Cursors are very bad for performance, and should be avoided always. Most of the time, cursors can be very easily replaced using joins. There are different types of cursors in sql server as listed below. We will talk about the differences between these cursor types in a later video session. 1. Forward-Only 2. Static 3. Keyset 4. Dynamic Let us now look at a simple example of using sql server cursor to process one row at time. We will be using tblProducts and tblProductSales tables, for this example. On my machine, there are 400,000 records in tblProducts and 600,000 records in tblProductSales tables. If you want to learn about generating huge amounts of random test data, please watch Part - 61 in sql server video tutorial. The link is below. http://www.youtube.com/user/kudvenkat/videos?flow=grid&view=1 Cursor Example: Let us say, I want to update the UNITPRICE column in tblProductSales table, based on the following criteria 1. If the ProductName = 'Product - 55', Set Unit Price to 55 2. If the ProductName = 'Product - 65', Set Unit Price to 65 3. If the ProductName is like 'Product - 100%', Set Unit Price to 1000 For the SQL code samples used in the demo please visit my blog at the following link http://csharp-video-tutorials.blogspot.com/2013/01/cursors-in-sql-server-part-63.html The cursor will loop thru each row in tblProductSales table. As there are 600,000 rows, to be processed on a row-by-row basis, it takes around 40 to 45 seconds on my machine. We can achieve this very easily using a join, and this will significantly increase the performance. We will discuss about this in our next video session. To check if the rows have been correctly updated, please use the following query. Select Name, UnitPrice from tblProducts join tblProductSales on tblProducts.Id = tblProductSales.ProductId where (Name='Product - 55' or Name='Product - 65' or Name like 'Product - 100%')
Views: 202300 kudvenkat
Bulk Exceptions in Oracle  | Oracle Tutorial | Mr. Murali
 
19:14
Bulk Exceptions in Oracle ►For Registration : https://goo.gl/r6kJbB ►Call: +91-8179191999 ► Visit Our Website: http://nareshit.in/ http://nareshit.com/ ► About NareshIT: "Naresh IT is the Best Software Training Institute for Hadoop, Salesforce, AWS, DevOps, Sprak, Data Science, Python, Tableau, RPA ,Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in Hyderabad, Chennai and Vijayawada, India which provides online and classroom training classes" ►For Registration : https://goo.gl/r6kJbB ►Call: India- 8179191999, USA- 404-232-9879 Email: [email protected] ►Our Online Training Features: 1.Training with Real-Time Experts 2.Industry Specific Scenario’s 3.Flexible Timings 4.Soft Copy of Material 5.Share Video's of each and every session. Check The Below Links: ►For Course Reg : https://goo.gl/r6kJbB ► Subscribe to Our Channel: https://goo.gl/q9ozyG ► Circle us on G+: https://plus.google.com/NareshIT ► Like us on Facebook: https://www.facebook.com/NareshIT ► Follow us on Twitter: https://twitter.com/nareshitech ► Visit Our Website: http://nareshit.in/ http://nareshit.com/
Views: 3166 Naresh i Technologies

dating chat rooms online
istp enfp dating
dating iol
36 year old man dating a 24 year old woman
black speed dating charlotte nc