Home
Search results “Update return value oracle”
HOW TO RETURN MULTIPLE VALUES FROM A PROCEDURE IN ORACLE PL/SQL? (USING OUT PARAMETERS)
 
04:46
This video tutorial explains how an oracle procedure can return multiple values with a proper example. The video tutorial shows how this problem can be tacked using simple and easy to understand out parameters!!!
Views: 10026 Kishan Mashru
How to return multiple values from a function in oracle pl/sql ? (without using out parameter)
 
14:19
This video demonstrates how a function can return multiple values to the calling environment, but without using multiple out parameters, the video shows an example on how we can create a object, a nested table based on the object and then returning the nested table type from the function.
Views: 15508 Kishan Mashru
Oracle : Stored Procedure with Input and Output Parameters
 
04:04
Oracle : Stored Procedure with Input and Output Parameters JavaEE Tutorials and Sample code - Click here : http://ramj2ee.blogspot.in/
Views: 27354 Ram N
Stored procedure output parameters or return values   Part 20
 
16:45
In this video we will 1. Understand what are stored procedure return values 2. Difference between stored procedure return values and output parameters 3. When to use output parameters over return values Text version of the video http://csharp-video-tutorials.blogspot.com/2012/08/stored-procedure-output-parameters-or.html Slides http://csharp-video-tutorials.blogspot.com/2013/08/part-20-stored-procedure-output.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: 257629 kudvenkat
How to Join two tables in a update statement
 
07:18
This video is to understand how we can update a column of a table, based on the data present on the other table, and both the tables having a common column. Its a complicated update statement that can be used to update with different conditions.
Views: 6816 Kishan Mashru
Oracle Applications R13 (update 18B) Spotlight on Supply Chain Management Cloud
 
04:37
Watch the R13 (update 18B) spotlight video on top level messages and product themes of Oracle Supply Chain Management Cloud. For more information on SCM Cloud, visit https://cloud.oracle.com/scm
Views: 322 Oracle Readiness
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: 35635 kudvenkat
SQL Tutorial 12 Advanced Subqueries returning multiple columns
 
14:22
SQL Tutorial on Advanced Subqueries returning multiple columns Check out our website: http://www.telusko.com Follow Telusko on Twitter: https://twitter.com/navinreddy20 Follow on Facebook: Telusko : https://www.facebook.com/teluskolearnings Navin Reddy : https://www.facebook.com/navintelusko Follow Navin Reddy on Instagram: https://www.instagram.com/navinreddy20 Subscribe to our other channel: Navin Reddy : https://www.youtube.com/channel/UCxmkk8bMSOF-UBF43z-pdGQ?sub_confirmation=1 Telusko Hindi : https://www.youtube.com/channel/UCitzw4ROeTVGRRLnCPws-cw?sub_confirmation=1
Views: 43449 Telusko
PL/SQL tutorial 81: PL/SQL Execute Immediate with INTO clause in Oracle Database
 
08:51
Learn what is an Execute Immediate statement and how to use dynamic SQL using Execute Immediate. In this video, you will also see an example of Execute Immediate with INTO clause by Manish Sharma ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: http://bit.ly/NDS-2 learn What Is A Data Warehouse: Definition and Benefits http://bit.ly/the-data-warehouse Previous Tutorial ► Introduction to Dynamic SQL https://youtu.be/Yzk1zENbhg4 ------------------------------------------------------------------------- ►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 http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ ___Facebook Official Page of Manish Sharma___ https://www.facebook.com/TheRebellionRider/ ___Facebook Official Page of RebellionRider.com___ https://www.facebook.com/RebellionRider.official/ You can also Email me at for E-mail address please check the 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: 3476 Manish Sharma
SQL Server - UPDATE RECORDS IN TABLE VIA STORED PROCEDURE
 
04:15
https://www.udemy.com/sql-server-fast-track-intro-to-queries/learn/v4/overview How to update table records via Stored Procedure in SQL Server. This is a very quick and concise tutorial with code that is easy to duplicate.
Views: 10342 Dave Merton
Insert and Commit: Databases for Developers #7
 
04:51
You load data into your database tables with an insert statement. In this episode Chris discusses how to use single and multirow inserts and their pros and cons. He also covers how to persist your changes to the database with commit. See the full syntax for insert in the SQL reference guide: http://docs.oracle.com/database/122/SQLRF/INSERT.htm#SQLRF01604 Take the Databases for Developers FREE SQL course at https://devgym.oracle.com/devgym/database-for-developers.html Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 4381 The Magic of SQL
LAST VALUE function in SQL Server
 
05:35
last_value function in sql server 2008 sql server last_value function returns incorrect data sql server last_value function example sql server last_value function with partition example LAST_VALUE function in SQL Server In this video we will discuss LAST_VALUE function in SQL Server. LAST_VALUE function Introduced in SQL Server 2012 Retrieves the last value from the specified column ORDER BY clause is required PARTITION BY clause is optional ROWS or RANGE clause is optional, but for it to work correctly you may have to explicitly specify a value Syntax : LAST_VALUE(Column_Name) OVER (ORDER BY Col1, Col2, ...) LAST_VALUE function not working as expected : In the following example, LAST_VALUE function does not return the name of the highest paid employee. This is because we have not specified an explicit value for ROWS or RANGE clause. As a result it is using it's default value RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW. SELECT Name, Gender, Salary, LAST_VALUE(Name) OVER (ORDER BY Salary) AS LastValue FROM Employees LAST_VALUE function working as expected : In the following example, LAST_VALUE function returns the name of the highest paid employee as expected. Notice we have set an explicit value for ROWS or RANGE clause to ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING This tells the LAST_VALUE function that it's window starts at the first row and ends at the last row in the result set. SELECT Name, Gender, Salary, LAST_VALUE(Name) OVER (ORDER BY Salary ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS LastValue FROM Employees LAST_VALUE function example with partitions : In the following example, LAST_VALUE function returns the name of the highest paid employee from the respective partition. SELECT Name, Gender, Salary, LAST_VALUE(Name) OVER (PARTITION BY Gender ORDER BY Salary ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS LastValue FROM Employees Text version of the video http://csharp-video-tutorials.blogspot.com/2015/10/lastvalue-function-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/10/lastvalue-function-in-sql-server_9.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: 29815 kudvenkat
JSON In the Oracle Database 12c Release 1 (12.1.0.2)
 
04:46
A really quick look at the ability to store JSON in the Oracle Database 12c Release 1 (12.1.0.2) and accessing it using Python and the Oracle_CX open source driver. You can find the Oracle documentation on it here http://docs.oracle.com/database/121/ADXDB/json.htm#ADXDB6246
Views: 7631 Dominic Giles
08 of  13 - Oracle APEX 5 - List of values (LOV) for a field in a form; display a hidden column
 
13:22
This is one in a series of videos about creating an application using Oracle APEX 5. In this video we create two lists of values (LOVs) in the Shared Components section of our application. We use each LOV in place of a field in a form. We see how APEX will help us write the SQL for a LOV. The difference between a "display value"and a "return value"is discussed. Finally, we display the primary key field in a form, which APEX hides by default. See the primary key field in a form can be helpful during application development. SQL scripts for this series are available to download at: http://web.nmsu.edu/~jkreie/oracle/DatabaseTopics.html or by request at http://db.kreie.net
Views: 32615 Jennifer Kreie
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: 16478 radhikaravikumar
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: 222402 The Bad Tutorials
SQL Tutorial - SQL DATE Functions like GETDATE, DATEADD, CONVERT
 
09:54
http://www.learningsqlserver2008.com/ https://youtu.be/KmsmPOImpHo - Date functions in SQL Server 2012 GETDATE -- Today's date DATEADD - adding time interval to an existing Date DATEPART - return part of the date like year or month DATEDIFF - Give you the different between two dates DAY - returns the day of the month MONTH - return the Month of the Year YEAR - returns the year in the Sql expression CAST - Converts an expression of one data type to another in SQL Server 2008 R2 CONVERT - Convert expressions of one data type to another in sql server r2 SQL Tutorial
Views: 52588 baghul
Part 2   SQL query to get organization hierarchy
 
10:14
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-2-sql-query-to-get-organization.html To get the best out of this video, the following concepts need to be understood first. These are already discussed in SQL Server Tutorial. 1. Self-Join - http://www.youtube.com/watch?v=qnYSN_7qwgg 2. CTE - http://www.youtube.com/watch?v=ZXB5b-7HJHk 3. Recursive CTE - http://www.youtube.com/watch?v=GGoV0wTMCg0 Here is the problem definition: 1. Employees table contains the following columns a) EmployeeId, b) EmployeeName c) ManagerId 2. If an EmployeeId is passed, the query should list down the entire organization hierarchy i.e who is the manager of the EmployeeId passed and who is managers manager and so on till full hierarchy is listed. For example, Scenario 1: If we pass David's EmployeeId to the query, then it should display the organization hierarchy starting from David. Scenario 2: If we pass Lara's EmployeeId to the query, then it should display the organization hierarchy starting from Lara. We will be Employees table for this demo. SQL to create and populate Employees table with test data Create table Employees ( EmployeeID int primary key identity, EmployeeName nvarchar(50), ManagerID int foreign key references Employees(EmployeeID) ) GO Insert into Employees values ('John', NULL) Insert into Employees values ('Mark', NULL) Insert into Employees values ('Steve', NULL) Insert into Employees values ('Tom', NULL) Insert into Employees values ('Lara', NULL) Insert into Employees values ('Simon', NULL) Insert into Employees values ('David', NULL) Insert into Employees values ('Ben', NULL) Insert into Employees values ('Stacy', NULL) Insert into Employees values ('Sam', NULL) GO Update Employees Set ManagerID = 8 Where EmployeeName IN ('Mark', 'Steve', 'Lara') Update Employees Set ManagerID = 2 Where EmployeeName IN ('Stacy', 'Simon') Update Employees Set ManagerID = 3 Where EmployeeName IN ('Tom') Update Employees Set ManagerID = 5 Where EmployeeName IN ('John', 'Sam') Update Employees Set ManagerID = 4 Where EmployeeName IN ('David') GO Here is the SQL that does the job Declare @ID int ; Set @ID = 7; WITH EmployeeCTE AS ( Select EmployeeId, EmployeeName, ManagerID From Employees Where EmployeeId = @ID UNION ALL Select Employees.EmployeeId , Employees.EmployeeName, Employees.ManagerID From Employees JOIN EmployeeCTE ON Employees.EmployeeId = EmployeeCTE.ManagerID ) Select E1.EmployeeName, ISNULL(E2.EmployeeName, 'No Boss') as ManagerName From EmployeeCTE E1 LEFT Join EmployeeCTE E2 ON E1.ManagerID = E2.EmployeeId
Views: 254557 kudvenkat
Part 8   Using stored procedures with entity framework code first approach
 
16:18
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-8-using-stored-procedures-with.html In this video we will discuss using stored procedures to perform Insert, Update and Delete operations using entity framework code first approach. public class EmployeeDBContext : DbContext { public DbSet[Employee] Employees { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder) { // This line will tell entity framework to use stored procedures // when inserting, updating and deleting Employees modelBuilder.Entity[Employee]().MapToStoredProcedures(); base.OnModelCreating(modelBuilder); } } Entity Framework will create the following stored procedures automatically Employee_Delete Employee_Insert Employee_Update The default, naming convention for the stored procedures INSERT stored procedure - EntityName_Insert UPDATE stored procedure - EntityName_Update DELETE stored procedure - EntityName_DeleteNote: Insert Stored procedure should return the auto-generated identity column value
Views: 85134 kudvenkat
SQL Aggregation queries using Group By, Sum, Count and Having
 
10:01
From SQL Queries Joes 2 Pros (Vol2) ch4.1. Learn up to write aggregated queries.
Views: 154604 Joes2Pros SQL Trainings
Calling a stored procedure with output parameters   Part 7
 
20:14
Text version of the video http://csharp-video-tutorials.blogspot.com/2012/10/calling-stored-procedure-with-output.html Slides http://csharp-video-tutorials.blogspot.com/2013/09/part-7-calling-stored-procedure-with.html All ADO .NET Text Articles http://csharp-video-tutorials.blogspot.com/p/free-adonet-video-tutorial.html All ADO .NET Slides http://csharp-video-tutorials.blogspot.com/p/adonet-slides.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 In this video, we will learn about calling a stored procedure with output parameters from an asp.net web application.
Views: 174714 kudvenkat
SQL Null or Empty   How to Check for Null or Empty Column in SQL Server   SQL Training Online
 
03:42
http://www.sqltrainingonline.com SQL Null or Empty - How to Check for Null or Empty Column in SQL Server - SQL Training Online You can download the sample table script at http://www.sqltrainingonline.com/how-to-filter-for-sql-null-or-empty-string/. In this video, I show you how to filter for a SQL null or empty string. It can be difficult to filter a null because you can't simply compare with an equal sign. You have to use a special IS NULL clause to make the filter work. I also show you how to combine both the SQL Null and Empty String together in a special trick with the isnull SQL Server function. I use SQL Server 2012 to demonstrate the technique. Let me know what you think by commenting or sharing on twitter, facebook, google+, etc. If you enjoy the video, please give it a like, comment, or subscribe to my channel. You can visit me at any of the following: SQL Training Online: http://www.sqltrainingonline.com Twitter: http://www.twitter.com/sql_by_joey Google+: https://plus.google.com/#100925239624117719658/posts LinkedIn: http://www.linkedin.com/in/joeyblue Facebook: http://www.facebook.com/sqltrainingonline
Views: 14332 Joey Blue
Oracle interview question difference between null functions
 
07:23
Difference between NVL,NVL2, NULLIF and COALESCE NVL function will check whether the first input parameter is null, if first input parameter is null then the function returns the second parameter value as output. NVL2 function will check the first parameter, and return second parameter if the first parameter is not null, otherwise returns third parameter. NULLIF will compare the input parameters ( first and second parameter ), and returns NULL of both are same, otherwise returns the first parameter value. COALESCE, returns the first not null expression in the given input parameters. -------------------------------------------------------------------------------------------------------- List of all the SQL and PLSQL interview questions https://easy-learning-tech.blogspot.com/p/oracle-sql-plsql-interview-questions.html
Views: 41 Siva Academy
Mysql - Stored Procedure with Input and Output Parameters
 
03:52
Mysql - Stored Procedure with Input and Output Parameters. JavaEE Tutorials and Sample code - Click here : http://ramj2ee.blogspot.in/
Views: 50580 Ram N
SSIS Tutorial Part 123-Get Delete/Update Record Count From Execute SQL Task & Write to File
 
19:43
SSIS Video Scenario: We want to create an SSIS Package in which we will be using a Stored Procedure, which will delete and update some records and return us the delete and update record count. Once the Stored Procedure is completed, we want to log the record count to a file file for our reference. We will append the record to flat file. In this video we will learn how to returned Number of records deleted or updated by a Stored Procedure that we called in Execute SQL Task. You will be able to learn following items from this video demo How to Create SSIS Package from Scratch How to create variables to hold the values from Execute SQL Task How to Create Stored Procedure that will return Delete and Update Record Count How to Map Store Procedure output to variables in SSIS Package How to Write Variable values to Flat File Blog post link for the video with scripts http://sqlage.blogspot.com/2015/04/how-to-return-deleted-and-update-record.html Check out step by Step SQL Server Integration Services(SSIS) Tutorial by TechBrothers http://www.techbrothersit.com/2014/12/ssis-videos.html
Views: 4381 TechBrothersIT
Part 1   How to find nth highest salary in sql
 
11:45
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-1-how-to-find-nth-highest-salary_17.html This is a very common SQL Server Interview Question. There are several ways of finding the nth highest salary. By the end of this video, we will be able to answer all the following questions as well. How to find nth highest salary in SQL Server using a Sub-Query How to find nth highest salary in SQL Server using a CTE How to find the 2nd, 3rd or 15th highest salary Let's use the following Employees table for this demo Use the following script to create Employees table Create table Employees ( ID int primary key identity, FirstName nvarchar(50), LastName nvarchar(50), Gender nvarchar(50), Salary int ) GO Insert into Employees values ('Ben', 'Hoskins', 'Male', 70000) Insert into Employees values ('Mark', 'Hastings', 'Male', 60000) Insert into Employees values ('Steve', 'Pound', 'Male', 45000) Insert into Employees values ('Ben', 'Hoskins', 'Male', 70000) Insert into Employees values ('Philip', 'Hastings', 'Male', 45000) Insert into Employees values ('Mary', 'Lambeth', 'Female', 30000) Insert into Employees values ('Valarie', 'Vikings', 'Female', 35000) Insert into Employees values ('John', 'Stanmore', 'Male', 80000) GO To find the highest salary it is straight forward. We can simply use the Max() function as shown below. Select Max(Salary) from Employees To get the second highest salary use a sub query along with Max() function as shown below. Select Max(Salary) from Employees where Salary [ (Select Max(Salary) from Employees) To find nth highest salary using Sub-Query SELECT TOP 1 SALARY FROM ( SELECT DISTINCT TOP N SALARY FROM EMPLOYEES ORDER BY SALARY DESC ) RESULT ORDER BY SALARY To find nth highest salary using CTE WITH RESULT AS ( SELECT SALARY, DENSE_RANK() OVER (ORDER BY SALARY DESC) AS DENSERANK FROM EMPLOYEES ) SELECT TOP 1 SALARY FROM RESULT WHERE DENSERANK = N To find 2nd highest salary we can use any of the above queries. Simple replace N with 2. Similarly, to find 3rd highest salary, simple replace N with 3. Please Note: On many of the websites, you may have seen that, the following query can be used to get the nth highest salary. The below query will only work if there are no duplicates. WITH RESULT AS ( SELECT SALARY, ROW_NUMBER() OVER (ORDER BY SALARY DESC) AS ROWNUMBER FROM EMPLOYEES ) SELECT SALARY FROM RESULT WHERE ROWNUMBER = 3
Views: 776282 kudvenkat
Oracle NVL Function Explained with Examples
 
09:25
https://www.databasestar.com/oracle-nvl-nvl2-logical-functions/ The Oracle NVL function allows you to check a value and return a different value if that value is NULL. It’s great for using another value if the first one is NULL or an optional value, for example people’s phone numbers. It’s also good alongside aggregate functions and grouping so you can see what the difference is between a subtotal row and an actual NULL value. The syntax of the Oracle NVL function is: NVL( check_value, replace_value ) The parameters are: - check_value (mandatory): This is the value that is displayed to the user. It is also the value that is checked for NULL. - replace_value (mandatory): This is the value that appears if the check_value is NULL. The function can use many different data types as parameters: string, date, or numeric. However, both parameters need to be the same type. For more information about the Oracle NVL function, including all of the SQL shown in this video and the examples, read the related article here: https://www.databasestar.com/oracle-nvl-nvl2-logical-functions/
Views: 52 Database Star
Oracle Payables Vendor Type Lookup Update
 
02:54
Oracle Payables Vendor Type Lookup Update How to clean up the available options in the Vendor Type drop down in Supplier setup
Views: 2219 JaleoTech
5  Update User information with Session to get current Database values on Update page with JSP Servl
 
24:05
Update User Info with session Current user values will be available in text boxes and drop downs modify any field if you want to and save changes to reflect in database detailed code using JSP and Servlet
002- |Solved|Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
 
06:25
002- Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'. Errors in vb
Views: 1212 Access Forever
The Magic of SQL: Column Update Mystery
 
07:20
You use the update statement in SQL to modify existing values in a row. Normally you have to assign values to each column explicitly. In this video Chris updates the value in one column and also changes the value in another column - without any triggers in sight! Watch the video to see how it's done! ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 6260 The Magic of SQL
M&A Update - Oracle's Bid for Sun Microsystems - Bloomberg
 
01:59
EU Probes Oracle-Sun Deal - Rivals Pushed for Probe on Concern Over MySQL Software Which Powers Some of the Top Websites
Views: 306 Bloomberg
SSIS "Execute SQL Task" - stored procedure with input parameters, output parameters & return value.
 
15:57
Demonstration of using SSIS Execute SQL Task to call a stored procedure to set SSIS variables from the stored procedure output parameter values and return value. No result set involved. Examples cover both OLEDB and ADO.NET.
Views: 12239 Steden Videos
Using Out Parameter in plsql procedure to return multiple values.
 
10:58
Using Out Parameter in pl sql procedure to return multiple values. Oracle tutorial to get multiple values through oracle pl sql stored procedure
Views: 4494 Subhroneel Ganguly
Oracle Jdeveloper12c ADF - 2) EO and VO with DML operations
 
10:51
1) How to create EO and VO. 2) ADF table tree with panelCollection and tools component. 3) Insert on that table. Visit my blog for more information http://parasshahjdeveloper12c.blogspot.in/2016/06/4-jdeveloper-12c-eo-entity-object-and.html
Views: 1391 Paras Shah
Part 7   Using stored procedures with entity framework
 
12:09
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-7-using-stored-procedures-with.html In this video we will discuss using our own custom stored procedures to perform Insert, Update and Delete operations using entity framework. Step 1: Create and populate Employee table. Step 2: Create Insert, Update and Delete stored procedures Step 3: Create a new empty asp.net web application Step 4: Add a new ADO.NET Entity Data Model. a) On Choose Model Contents screen select "Generate from database" option and click Next b) On "Choose Your Data Connections" screen give a meaningful name for the connection string that will be stored in the web.config file. I have named it EmployeeDBContext. Click Next. c) On "Choose Your Database Objects" screen, select Employees Table and the 3 strored procedures (InsertEmployee, UpdateEmployee, DeleteEmployee). Provide a meaningful name for the Model namespace. I have named it EmployeeModel. CLick Finish. At this point on the ADO.NET Entity Model designer surface, we should be able to see the Employee entity but not the stored procedures. To view the stored procedures, 1. Right click on entity model designer surface and select "Model Broswer" from the context menu. 2. Expand Stored Procedures folder Step 5: Add a webform to the project. Drag and drop the following 3 controls and build the solution. 1. GridView 2. DetailsView 3. EntityDataSource Step 6: Configure EntityDataSource control a). Right click on EntityDataSource control and select "Show Smart Tag" option b) Click on Configure Data Source link c) Select EmployeeDBContext from the Named Connection dropdownlist and click Next d) Select the options on "Configure Data Selection" screen as shown in the video Step 7: Configure GridView control a). Right click on GridView control and select "Show Smart Tag" option b) Click on "Auto Format" link and select "Colourful" scheme c) Select "EntityDataSource1" from "Choose Data Source" dropdownlist d) Select Enable Editing and Enable Deleting checkboxes Step 8: Configure DetailsView control a) Right click on DetailsView control and select "Show Smart Tag" option b) Click on "Auto Format" link and select "Colourful" scheme c) Select "EntityDataSource1" from "Choose Data Source" dropdownlist d) Select Enable Inserting checkbox e) Set DeafultMode=Insert. Use properties window to set this. f) Set InsertVisible="false" for the ID BoundField. You can do this directly in the HTML Source. g) Generate ItemInserted event handler method for DetailsView control. Copy and paste the following code. protected void DetailsView1_ItemInserted(object sender, DetailsViewInsertedEventArgs e) { GridView1.DataBind(); } At this point if you run the application, and if you insert, update and delete employees, by default entity framework will use the sql it autogenerates and not our custom stored procedures. To tell the entity framework to use the stored procedures, we have to map them to the Employee entity. Here are the steps. 1. Right click on "Employee" entity on "EmployeeModel.edmx" and select "Stored Procedure Mapping" option from the context menu. 2. In the "Mapping Details" windows specify the Insert, Update and Delete stored procedures that you want to use with "Employee" entity At this point, 1. Run SQL Prrofiler 2. Run the application 3. Insert, Update and Delete Employee, and notice that the respective stored procedures are being called now.
Views: 124459 kudvenkat
Java & MySQL - Check if a value already exists
 
12:03
Easy tutorial on how to check if a value already exists in the database.
Views: 23671 Mozoran
ICO now label as securities.. Chrysos, THE ORACLE + Finecoin update
 
07:09
I don't like to speculate if i don't know i don't know join Fine coin here http://bit.ly/2GKmCiN
Views: 73 Regidan_Da_Don
C# Tutorial 10:  How to Link Combobox with Database values
 
08:50
------------------Online Courses to learn---------------------------- Java - https://bit.ly/2H6wqXk C++ - https://bit.ly/2q8VWl1 AngularJS - https://bit.ly/2qebsLu Python - https://bit.ly/2Eq0VSt C- https://bit.ly/2HfZ6L8 Android - https://bit.ly/2qaRSAS Linux - https://bit.ly/2IwOuqz AWS Certified Solutions Architect - https://bit.ly/2JrGoAF Modern React with Redux - https://bit.ly/2H6wDtA MySQL - https://bit.ly/2qcF63Z ----------------------Follow--------------------------------------------- My Website - http://www.codebind.com My Blog - https://goo.gl/Nd2pFn My Facebook Page - https://goo.gl/eLp2cQ Google+ - https://goo.gl/lvC5FX Twitter - https://twitter.com/ProgrammingKnow Pinterest - https://goo.gl/kCInUp Text Case Converter - https://goo.gl/pVpcwL -------------------------Stuff I use to make videos ------------------- Stuff I use to make videos Windows notebook – http://amzn.to/2zcXPyF Apple MacBook Pro – http://amzn.to/2BTJBZ7 Ubuntu notebook - https://amzn.to/2GE4giY Desktop - http://amzn.to/2zct252 Microphone – http://amzn.to/2zcYbW1 notebook mouse – http://amzn.to/2BVs4Q3 ------------------Facebook Links ---------------------------------------- http://fb.me/ProgrammingKnowledgeLearning/ http://fb.me/AndroidTutorialsForBeginners http://fb.me/Programmingknowledge http://fb.me/CppProgrammingLanguage http://fb.me/JavaTutorialsAndCode http://fb.me/SQLiteTutorial http://fb.me/UbuntuLinuxTutorials http://fb.me/EasyOnlineConverter ---------------------------------------------------------------------------- how to bind combobox to textbox in C# ComboBox and TextBox‎ C# How to show combo box selected value in a text box‎ C# selecting an item in combobox and display corresponding Populate combobox from database C# How to get data in combobox from database? Populating a Combobox from a Dictionary How to fill different ComboBoxes in a DataGridView C# code add database column to datagridview combobox C# Populate combobox from database How to get data in combobox from database? Populating a Combobox from a Dictionary How to fill different ComboBoxes in a DataGridView code add database column to datagridview combobox Enter values into combobox from database‎ Enter values into combobox from database‎ C#
Views: 206718 ProgrammingKnowledge
01 Oracle database Table lock
 
20:58
Purpose Use the LOCK TABLE statement to lock one or more tables, table partitions, or table subpartitions in a specified mode. This lock manually overrides automatic locking and permits or denies access to a table or view by other users for the duration of your operation. Some forms of locks can be placed on the same table at the same time. Other locks allow only one lock for a table. A locked table remains locked until you either commit your transaction or roll it back, either entirely or to a savepoint before you locked the table. A lock never prevents other users from querying the table. A query never places a lock on a table. Readers never block writers and writers never block readers. See Also: Oracle Database Concepts for a complete description of the interaction of lock modes COMMIT ROLLBACK SAVEPOINT Prerequisites The table or view must be in your own schema or you must have the LOCK ANY TABLE system privilege, or you must have any object privilege on the table or view. ROW SHARE ROW SHARE permits concurrent access to the locked table but prohibits users from locking the entire table for exclusive access. ROW SHARE is synonymous with SHARE UPDATE, which is included for compatibility with earlier versions of Oracle Database. ROW EXCLUSIVE ROW EXCLUSIVE is the same as ROW SHARE, but it also prohibits locking in SHARE mode. ROW EXCLUSIVE locks are automatically obtained when updating, inserting, or deleting. SHARE UPDATE See ROW SHARE. SHARE SHARE permits concurrent queries but prohibits updates to the locked table. SHARE ROW EXCLUSIVE SHARE ROW EXCLUSIVE is used to look at a whole table and to allow others to look at rows in the table but to prohibit others from locking the table in SHARE mode or from updating rows. EXCLUSIVE EXCLUSIVE permits queries on the locked table but prohibits any other activity on it. NOWAIT Specify NOWAIT if you want the database to return control to you immediately if the specified table, partition, or table subpartition is already locked by another user. In this case, the database returns a message indicating that the table, partition, or subpartition is already locked by another user. WAIT Use the WAIT clause to indicate that the LOCK TABLE statement should wait up to the specified number of seconds to acquire a DML lock. There is no limit on the value of integer. If you specify neither NOWAIT nor WAIT, then the database waits indefinitely until the table is available, locks it, and returns control to you. When the database is executing DDL statements concurrently with DML statements, a timeout or deadlock can sometimes result. The database detects such timeouts and deadlocks and returns an error.
Views: 558 OnLinE ReSoUrCe
PostgreSQL tutorial - functions
 
16:18
Postgres tutorial lesson 8 presents how to write and execute functions and trigger functions. For more lessons, visit http://www.learn-with-video-tutorials.com/postgresql-tutorial-video
Java - JTable show Selected Row Data In Another JFrame [ with source code ]
 
06:32
Display JTable Selected Row Records In JTextFields In Another JFrame Source Code: http://1bestcsharp.blogspot.com/2016/01/java-display-jtable-row-data-jtextfields.html All My Programming Projects Here --- http://bit.ly/2HrU8hK My Source Code Store --- http://bit.ly/2OsC0TU Java Course -- http://bit.ly/2HXSuAn C# And Java Programming Projects With Source Code: http://1bestcsharp.blogspot.com/p/programming-projects.html visit our blog https://1bestcsharp.blogspot.com/ facebook: https://www.facebook.com/1BestCsharp twitter: https://www.twitter.com/1BestCsharp_ subscribe: http://goo.gl/nRjPKk In this java Tutorial we will see How To Display The Selected JTable Row Data In Another JFrame JTextFields When JTable Mouse Clicked Using NetBeans . we are gonna use: java programming language NetBeans IDE Swing : JFrame, JTable, JTextFields, JLabel JAVA Tutorials: Insert Update Delete Data In MySQL Database Using Java https://www.youtube.com/watch?v=uKEgKETRCzE Add And Update A Row To JTable From JTextField + Delete Row In Java https://www.youtube.com/watch?v=22MBsRYuM4Q JAVA MySQL Database Rocords Navigation Buttons https://www.youtube.com/watch?v=WkPWPuGHTTI Search Values From MySQL Database And Set It Into JTextfield In Java https://www.youtube.com/watch?v=uuhEb0k3vVE bind jtable from mysql database in netbeans https://www.youtube.com/watch?v=G4JeKZ6nDUI Bind a JCombobox With Database Values In Java NetBeans https://www.youtube.com/watch?v=23-90p2xceg insert Image in MySQL Database using Java https://www.youtube.com/watch?v=UusZGBkV6HI Drag And Drop Image In Netbeans https://www.youtube.com/watch?v=bD3X_-QeLKc Java Graphics Tutorial Draw Chess Board https://www.youtube.com/watch?v=no4m-TIX-rc Java Login Form With MySQL Database Part 1 : https://www.youtube.com/watch?v=7sNYhlBz9xo Part 2 : https://www.youtube.com/watch?v=meGhTnlS9k4 Image Slideshow In netbeans https://www.youtube.com/watch?v=pN1uoJD_uSE Retrieve And Display Image From Mysql In Java https://www.youtube.com/watch?v=7QEgJnnEmnE Export JTable Data To Text File In NetBeans https://www.youtube.com/watch?v=tg7M9YvYDqo How To Bind JTable From MySQL Using ArrayList In NetBeans https://www.youtube.com/watch?v=2d4i6BXQPFA How To Browse Image To Jlabel Using JFilechooser In NetBeans https://www.youtube.com/watch?v=VHd29F_Tk04 How To display Image From Database To JTable In Java https://www.youtube.com/watch?v=-ekqLViEvHg How To Get JTable Column Sum, Avarage, Max, Min Value In Java https://www.youtube.com/watch?v=ZCfk6S2BksA How To Set A Timer In NetBeans https://www.youtube.com/watch?v=Vu31hcNuSXo Drag And Drop Text In Netbeans https://www.youtube.com/watch?v=CQpiplV3fXg Populate JTable Depending On a JCombobox Value Using NetBeans https://www.youtube.com/watch?v=9NO0AHxvgio How To Connect Java To MySQL Database And Display Data Using NetBeans https://www.youtube.com/watch?v=zM7oe2_S-jY Display Image From JTable To JLabel In Java https://www.youtube.com/watch?v=nHCCubgd74s How To Filter Data From MySQL And Show It In JTable https://www.youtube.com/watch?v=TfuC_bxwr3w https://www.youtube.com/watch?v=i9_Kx_79RWo Populate a HashMap From MySQL DataBase https://www.youtube.com/watch?v=WAIcC3pl94o Import A Text From Tex File To A JTextPane https://www.youtube.com/watch?v=QWKkE1wbiAQ How To Use Stored Procedure In Java And MySQL https://www.youtube.com/watch?v=pux1p52ZaQw Populate JCombobox From MySQL With Key And Value https://www.youtube.com/watch?v=gheAMX-MGN8 Populate JCombobox Depending On Another JCombobox https://www.youtube.com/watch?v=O_aSNfGSD20 How To Sort JTable Data https://www.youtube.com/watch?v=trWVSIq-6Mo Add And clear All JTexfields Using Table https://www.youtube.com/watch?v=-zTvjp84sk4 jtable click https://www.youtube.com/watch?v=91Rp2MA0i94 jtable click and show image https://www.youtube.com/watch?v=Dg6aHH-35SU show jtable row data in another jframe https://www.youtube.com/watch?v=9Ot-cWh0Rhw images navigation from a folder https://www.youtube.com/watch?v=OTTIsOSzSts JTable display selected rows to another jtabel https://www.youtube.com/watch?v=R_ybbxZLS3c Populate A Jtable With A List Of Files Names From Resource Folder https://www.youtube.com/watch?v=ODZAhWZitlk image and data navigation from mysql https://www.youtube.com/watch?v=2NIHOMvlTRY https://www.youtube.com/watch?v=JEcO4p_1_7c insert update delete and display data in jtable https://www.youtube.com/watch?v=QKsfHqu4Pps https://www.youtube.com/watch?v=WIMojkwMTa0
Views: 46926 1BestCsharp blog
Create Authentication Schemes in oracle APX
 
12:54
Create Authentication Schemes in oracle application express PL/SQL code is FUNCTION my_auth(p_username IN VARCHAR2,p_password IN VARCHAR2) RETURN BOOLEAN AS FOUND NUMBER :=0; BEGIN SELECT 1 INTO FOUND FROM MY_USERS WHERE UPPER(user_name)=UPPER(p_username) and upper(user_password)=upper(p_password) and user_activated=1; return true; exception when no_data_found then return false; end; and the user table is : CREATE TABLE "USERS_L" ( "U_ID" NUMBER, "U_NAME" VARCHAR2(20), "U_PASSWORD" VARCHAR2(20), "U_ACTIVATED" NUMBER, PRIMARY KEY ("U_ID") ) if you have any problem in this topic then comment
Views: 4203 Khabbab Hossain
Select and Update with Web Services Data Controls
 
06:39
Shows how to use two web service data controls - one lists objects and the other updates an object. How to pass a selected object between the two pages and services. Related blog - https://blogs.oracle.com/shay/entry/passing_parameters_between_web
Views: 2769 ShayJDev
PL/SQL tutorial 3: SELECT INTO statement in PL/SQL by Manish Sharma RebellionRider
 
05:22
How to initialize the variable by fetching values from the table of the database or by using SELECT INTO statement in PL/SQL by Manish Sharma RebellionRider ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/select-into-statement-pl-sql Previous Tutorial ► Variables: https://youtu.be/2MNmodawvnE ------------------------------------------------------------------------- ►►►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: 105801 Manish Sharma
How to retrieve data from database and Display in JSP Page?
 
08:16
In this video tutorial you will learn How to retrieve data from database and Display in JSP Page? Get the source code from http://www.roseindia.net/jsp/how-to-retrieve-data-from-database-in-jsp.shtml
Views: 58356 roseindiatutorials
02 Shared Lock & Exclusive Lock In oracle database table lock
 
11:32
Purpose Use the LOCK TABLE statement to lock one or more tables, table partitions, or table subpartitions in a specified mode. This lock manually overrides automatic locking and permits or denies access to a table or view by other users for the duration of your operation. Some forms of locks can be placed on the same table at the same time. Other locks allow only one lock for a table. A locked table remains locked until you either commit your transaction or roll it back, either entirely or to a savepoint before you locked the table. A lock never prevents other users from querying the table. A query never places a lock on a table. Readers never block writers and writers never block readers. See Also: Oracle Database Concepts for a complete description of the interaction of lock modes COMMIT ROLLBACK SAVEPOINT Prerequisites The table or view must be in your own schema or you must have the LOCK ANY TABLE system privilege, or you must have any object privilege on the table or view. ROW SHARE ROW SHARE permits concurrent access to the locked table but prohibits users from locking the entire table for exclusive access. ROW SHARE is synonymous with SHARE UPDATE, which is included for compatibility with earlier versions of Oracle Database. ROW EXCLUSIVE ROW EXCLUSIVE is the same as ROW SHARE, but it also prohibits locking in SHARE mode. ROW EXCLUSIVE locks are automatically obtained when updating, inserting, or deleting. SHARE UPDATE See ROW SHARE. SHARE SHARE permits concurrent queries but prohibits updates to the locked table. SHARE ROW EXCLUSIVE SHARE ROW EXCLUSIVE is used to look at a whole table and to allow others to look at rows in the table but to prohibit others from locking the table in SHARE mode or from updating rows. EXCLUSIVE EXCLUSIVE permits queries on the locked table but prohibits any other activity on it. NOWAIT Specify NOWAIT if you want the database to return control to you immediately if the specified table, partition, or table subpartition is already locked by another user. In this case, the database returns a message indicating that the table, partition, or subpartition is already locked by another user. WAIT Use the WAIT clause to indicate that the LOCK TABLE statement should wait up to the specified number of seconds to acquire a DML lock. There is no limit on the value of integer. If you specify neither NOWAIT nor WAIT, then the database waits indefinitely until the table is available, locks it, and returns control to you. When the database is executing DDL statements concurrently with DML statements, a timeout or deadlock can sometimes result. The database detects such timeouts and deadlocks and returns an error.
Views: 659 OnLinE ReSoUrCe
Oracle Database 12c Security - Oracle Virtual Private Database (VPD)
 
12:29
Learn how to use Oracle Virtual Private Database (VPD) to secure your data. See all lessons at http://skillbuilders.com/12c-TSDP-Tutorial First, Virtual Private Database. What is it? Answer: It's a declarative technique for enforcing security. Typically, it's based on user application context. That was the first limitation of 8i. Backed with 8i context were session-specific. The context variables were sort in the PGA. That means you simply couldn't use this in a web environment. However, global context, with use of 9i, Virtual Private Database became usable for web applications with connection pooling. But whether you're using it to client server or on a three tier environment, it's declarative technique rather than a programmatic technique. I can go behind the back of the application as a DBA and generate predicates to get appended to all SQLs. Select, insert, update, delete the end users. Issue the SQL and I will generate a predicate that filters the access. It's impossible to bypass. All users will have predicates appended to all their code. It doesn't matter whether they're using SQL Plus, Discoverer, Business Objects, Crystal Reports, eBusiness Suites, whatever they're using, I as DBA can filter their access to roles. The end result, different users see different data sets while running the same code and accessing the same tables, hence, the name Virtual Private Database. Different users will think they're seeing a totally different set of tables, but in fact it's one column database, one set of tables hosting a single application shared by all the users. The mechanism - you can apply VPD to tables, to views, to synonyms, and a declarative technique. Once the technique you write a function that generates the predicate, you associate the function with the table. From then on whenever the user issue SQL against that table the Cost-Based Optimizer rewrites the code. The Cost-Based Optimizer rewrites the user SQL to call the function to generate the predicate. The predicate is then appended to the SQL and it's the modified SQL that is parsed and executed. Let's see how this actually works. I'm working here by the way. This is just a perfectly normal 12.1 database. But what I'm going to demonstrate at this point will in fact work on 11g as well. I'm not going to be using any of the 12c enhancements to VPD for this little demonstration. I'll work in the scott schema. What do we have to do? We write a function to generate the predicate string. Create function. And I'll my function vpdf. The function must conform to a fixed specification. It must take two varchar arguments. One of the arguments is intended to be the schema to which the function will be applied. The other argument is the object within the schema to which the function will be applied. And it must return a varchar2, which is the generated predicate. Let's begin. Within this function you can do just about anything. There are some limitations. It's impossible for the function to query or update the table against which the VPD calls here is going to be applied or we violate the rules of purity that we come across so often with PL/SQL. But apart from that, it can do just about anything - including a number of dreadful side effects can be introduced by writing VPD functions. I'm going to do a very simple one on this one. I'll shall simple return immediately a predicate. What predicate? Ename, which is the ename column from this scott.emp table. Ename should equal sys_context. I'll go to the local context, my user end context, and just extract session user. We can see that John has tested this earlier today and therefore the object already was suggesting and he's just dropping it now and cleaning up the recreate. I hope you realize these really are live demonstrations. I'm not just running scripts. I've created a function. What's that function going to do? It's going to return this value here. Test it. Always test it and see what it's actually going to do. I'll select vpdf. I have to give it a couple of arguments. This one will do for now.
Views: 4284 SkillBuilders