Home
Search results “Select values into 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: 11401 Kishan Mashru
CREATE TABLE, INSERT VALUES, SELECT statement in Oracle SQL
 
05:07
How to CREATE TABLE, INSERT values, SELECT statement in oracle SQL
How to Parse XML in Oracle
 
13:54
This Video Shows 1. How to Read and parse XML in Oracle using EXTRACTVALUE and XMLTABLE. 2. When to use extractvalue and XMLTable. 3. Brief Introduction to XMLPATH
Views: 9373 yrrhelp
SQL Into - How to Copy Table Data with Select Into Statement - SQL Training Online
 
05:08
http://www.sqltrainingonline.com SQL Into - How to Copy Table Data with Select Into Statement - SQL Training Online In this video, I show you how to copy data using the SQL INTO statement. Including a trick to copy only a table schema in SQL Server. How do you copy a whole table in SQL Server? You often see the SQL INTO statement when you are using INSERT, but there is a special INTO statement in SQL Server that is used with the SELECT statement that allows you to make a copy of a table for development, testing, or whatever purpose you can think of. So, to start, let's take a look at the SQL Training Online Simple DB employee table. You can see that we have 14 records Now, all we have to do to make a copy of the table is to simply add the SQL INTO clause: SELECT * INTO EMPLOYEE_TEST FROM EMPLOYEE If we run that, you see that we made a copy of the table with all of the data. Now, I want to go ahead and empty the employee_test table and show you how to use the INSERT INTO. If you already have a copy of the table, (I will show you a shortcut in a minute on how to create a copy without data.) then you can use the following insert into statement: INSERT INTO EMPLOYEE_TEST SELECT * FROM EMPLOYEE After running that statement, you see that I have inserted data from the Employee table into the employee_test table. This is sometimes referred to as INSERT INTO SELECT. But, there is one trick that I have used throughout the years that is pretty cool. Sometimes, you want the table schema, but you don't want the data. Now, I know that you can use Management Studio to script out the table for you, but there is an easier way that is more flexible as far as I am concerned. That is to use the SELECT INTO FROM, but put the following in the WHERE clause: SELECT * INTO EMPLOYEE_TEST FROM EMPLOYEE WHERE 1=2 The 1=2 makes is so not data will come over, but you get the new table with the right column types. Is that pretty cool? I have found many uses for this over the years. Let me know what you think bellow. 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: 21814 Joey Blue
Oracle sql Interview Question : How to change rows to column
 
09:18
This video tutorial talks about the frequently asked oracle sql interview question of changing rows to the column. Based on the given scenario, we are asked to change the presentation of data in a table with 3 rows and 2 column to 3 columns and 2 rows. Decode Function in oracle https://youtu.be/YUAjPMjqMws Pivot and unpivot in oracle https://youtu.be/6s0DI1YcWIM
Views: 12467 Kishan Mashru
7- Oracle Database insert - update - delete - intro select - -char functions.avi
 
41:09
7-Oracle Database - SQL - insert - update - delete - intro select - working with dates and default value - to_date and to_char functions.avi
Views: 2711 Adel Sabour
Get Identity Column Values without mentioning Identity Column Name in Select - SQL Tutorial Part 46
 
02:35
SQL Server / TSQL Tutorial Scenario: How to Get Identity Column Values without mentioning Identity Column Name in Select You took a quick look on Table and Columns in SQL Server but could not find if Identity Property is enabled on one of the column. You don't want to use system tables to find out the column name if identity is enabled or not but want to get the column name with data. How would you do that? Link to scripts used in the video http://www.techbrothersit.com/2016/02/how-to-get-identity-column-values.html Check out our website for Different SQL Server, MSBI tutorials and interview questions such as SQL Server Reporting Services(SSRS) Tutorial SQL Server Integration Services(SSIS) Tutorial SQL Server DBA Tutorial SQL Server / TSQL Tutorial ( Beginner to Advance) http://www.techbrothersit.com/
Views: 1127 TechBrothersIT
Session7 INSERT Statement
 
24:08
Session 7: Populating(INSERT) data into database table in Oracle. 1. Insert data into all columns(complete record) in a table. 2. Insert data into a table in same/random order of column. 3. Insert data into selective columns of a table. 4. Inserting NULL value into table. 5. Prompt the column to insert values in runtime using ‘&' and ‘&&'. 6. Insert data using select statement. 7. Create table as select.(create table with/without data). 8. Insert huge amount of dummy data using a PL/SQL block. — Create a table. CREATE TABLE emp (EmpID NUMBER(4) PRIMARY KEY, EName VARCHAR2(20) NOT NULL, Job VARCHAR2(20), DeptNo NUMBER(3), Sal NUMBER(7,2)); Insert data into all columns(complete record) in a table. same order of column: INSERT INTO emp VALUES(111, 'SCOTT', 'MANAGER', 10, 50000); INSERT INTO emp(EmpID, EName, Job, DeptNo, Sal) VALUES(112, 'JONES', 'DESIGNER', 20, 40000); Random order of column values: INSERT INTO emp VALUES(113, 45000, 10, 'SMITH', 'MANAGER'); — show error, why ?? INSERT INTO emp(EmpID, Sal , DeptNo, EName, Job) VALUES(113, 45000, 10, 'SMITH', 'MANAGER'); Insert data into selective columns of a table. INSERT INTO emp VALUES(122, 10, 'SMITH'); — show error INSERT INTO emp(EmpID, DeptNo, EName) VALUES(222, 10, 'SMITH'); Inserting NULL value into table. INSERT INTO emp VALUES(214, 'JONES', NULL, NULL, 40000); INSERT INTO emp(EmpID, EName, Sal) VALUES(215, 'ADEMS', 40000); Prompt the column to insert values in runtime using ‘&' and ‘&&'. INSERT INTO emp VALUES(&empid, '&ename', '&job', &deptno, &sal); INSERT INTO emp VALUES(&empid, &ename, &job, &deptno, &sal); INSERT INTO emp(EmpID, EName, Job, DeptNo, Sal) VALUES (&empid, '&ename', '&job', &deptno, &sal); INSERT INTO emp(EmpID, DeptNo, EName) VALUES (&empid, &deptno, '&ename'); INSERT INTO emp(EmpID, DeptNo, EName, Sal) VALUES (&empid, &&deptno, '&ename', &&sal); Insert data using select statement. INSERT INTO emp (SELECT 222, 'SATISH', 'MANAGER', 30, 60000 FROM DUAL); INSERT INTO emp VALUES(SELECT 223, 'RAHUL', 'SALESMAN', 30, 30000 FROM DUAL); — show error. Create table as select.(create table with/without data). CREATE TABLE emp_copy AS SELECT * FROM emp; — create table with same table structure, with data. SELECT * FROM tab; SELECT * FROM emp_copy; CREATE TABLE emp_copy2 AS SELECT * FROM emp where 1 != 1; — create table with same table structure, without data. SELECT * FROM tab; SELECT * FROM emp_copy2; Insert huge amount of dummy data using a PL/SQL block. BEGIN FOR i IN 1..100 LOOP INSERT INTO emp VALUES(i, 'Ename_'||i, 'Job_'||i, (MOD(i,5)+1)*10, (MOD(i,5)+1)*10000); END LOOP; END; / SELECT * FROM emp;
Formatting your Oracle Query Results Directly to CSV
 
03:02
How to get Oracle SQL Developer to automatically format your query results to CSV, HTML, JSON, Insert statements, and more.
Views: 39120 Jeff Smith
SQL Distinct and Multiple Columns
 
02:53
Jamie King of Neumont University showing how SQL DISTINCT varies when multiple columns are present in the result set.
Views: 17550 Jamie King
PL/SQL tutorial 86: Multiple Bind Variable with Execute Immediate of Dynamic SQL By Manish Sharma
 
12:29
Manish Sharma from RebellionRider.com presents how to use multiple bind variables by applying using clause of execute immediate statement in native dynamic SQL. ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: http://bit.ly/nds-7 Previous Tutorial ► PL/SQL tutorial 45 https://youtu.be/byGweJ3tBLo ------------------------------------------------------------------------- ►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: 2195 Manish Sharma
HOW TO IDENTIFY AND DELETE DUPLICATE ROWS USING ROWID AND GROUPBY IN ORACLE SQL
 
07:53
This video demonstrates examples on how to find and delete duplicate records from a table. The video gives simple and easy to understand examples on finding duplicate records from a table using group by and having clause and row_number function. It also shows the ways in which duplicates can be deleted very efficiently using the rowid of that record. You can get the code from our website http://oracleplsqlblog.com/FullBlog/FullBlog/21
Views: 8272 Kishan Mashru
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: 836081 kudvenkat
HOW TO INSERT VALUES IN TABLE(ORACLE)
 
05:07
STUDENT MARKS....
Views: 688 Rajeev kumar
ADF Training | Select One Choice with Managed Bean
 
08:36
ADF Training https://www.fireboxtraining.com/oracle-adf-training | Learn how to add a Select One Choice component to a JSF page. See how to create radio buttons in Oracle ADF. The choices are populated by a managed bean, and the selected choice is stored in the same managed bean. You could, of course, store it in a business component if you wanted!
Views: 32890 Firebox Training
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: 235758 The Bad Tutorials
How to transpose column to row in sql
 
12:43
Hi friends today we will learn how to transpose column data into row of table. #transposecolumntorow Oracle database Unbeatable,Unbreakable Platform..
Views: 14920 Oracle World
SQL with Oracle 10g XE - Using LIKE for Wildcards with SELECT
 
05:02
In this video I use the LIKE command rather than an equals sign to place a condition on my query to allow the use of wildcards within my criteria. When using SQL with Oracle you will need to use the percent sign as the "all characters" wildcard. I perform several queries using the wildcard as describe the results. This video is part of a series of videos with the purpose of learning the SQL language. For more information visit Lecture Snippets at http://lecturesnippets.com.
Views: 4108 Lecture Snippets
SQL: Insert Values, Select Into, and Backup Table
 
06:12
Learn how to create a backup of the data and Insert
Views: 979 A Estrada
SQL DISTINCT Within a SELECT - Retrieving Unique Values
 
03:41
Jamie King of Neumont University demonstrating use of DISTINCT within a SQL SELECT command.
Views: 21138 Jamie King
Oracle tutorial : Using execution plan to optimize query in oracle
 
12:54
Oracle tutorial: Explain plan for query optimization in Oracle PLSQL oracle tutorial for beginners using execution plan to optimize query sql query analyzer sql query cost analysis https://techquerypond.wordpress.com This oracle tutorial show you how to use EXPLAIN PLAN in oracle. This video covers how to check cost of the query from DBMS_XPLAN.DISPLAY . You can find the cost of the query using the Using EXPLAIN PLAN FOR and based on the result you can optimize the query for faster performance. Subscribe on youtube: https://www.youtube.com/channel/UCpiyAesWNYOXSz5GPq8lbkA For more tutorial please visit #techquerypond https://twitter.com/techquerypond
Views: 8981 Tech Query Pond
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: 50360 Telusko
Part 6   Transform rows into columns in sql server
 
08:53
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/06/part-6-transform-rows-into-columns-in.html This is another common sql server interview question. We will be using Countries table in this example. SQL to create the table Create Table Countries ( Country nvarchar(50), City nvarchar(50) ) GO Insert into Countries values ('USA','New York') Insert into Countries values ('USA','Houston') Insert into Countries values ('USA','Dallas') Insert into Countries values ('India','Hyderabad') Insert into Countries values ('India','Bangalore') Insert into Countries values ('India','New Delhi') Insert into Countries values ('UK','London') Insert into Countries values ('UK','Birmingham') Insert into Countries values ('UK','Manchester') Here is the interview question. Write a sql query to transpose rows to columns. Using PIVOT operator we can very easily transform rows to columns. Select Country, City1, City2, City3 From ( Select Country, City, 'City'+ cast(row_number() over(partition by Country order by Country) as varchar(10)) ColumnSequence from Countries ) Temp pivot ( max(City) for ColumnSequence in (City1, City2, City3) ) Piv
Views: 180078 kudvenkat
PIVOT Tutorial - generating dynamic column with PIVOT Interview Question SQL
 
14:14
In this lecture you will learn about PIVOT operator and using it to generate dynamic columns.PIVOT is very use full operator to convert values into columns. PIVOT: •Convert your output from (values)vertical order to horizontal(making columns) one Topic to cover: •PIVOT example •PIVOT syntax •Interview Question •PIVOT on northwind •Dynamic PIVOT query http://www.techsapphire.in/index/pivot_sql_lesson_with_generating_dynamic_columns_with_pivot/0-158
Views: 27321 techsapphire
Oracle SQL PLSQL 12C Tutorial 8   SELECT Command , Fetch Data from Table
 
09:41
This Video Tutorial Will Describe how to select or retrieve values or data into a table in oracle 12C version. This command will also work on other versions of database like Oracle 11g Database, Oracle 10g Database, Oracle 9i Database, Oracle 8i Database, Oracle 8 Database and so on. Whenever you create a new table in oracle, you need to insert some data into that table otherwise that table is not usable. Example to select data, to update data and delete data, you first need to insert some data. Then this part comes where you select the data from the table. Full Syntax will be given in this video tutorial about how to select records from oracle database table. Along with the live example to select records. All the keywords, format, mandatory clauses etc are described in this video.
Views: 78 game hounds
SQL with Oracle 10g XE - Using the DISTINCT Function
 
02:52
In this video I use the DISTINCT function to list the values of a column from a query and remove the duplicate listings. When using the DISTINCT function be sure to have parenthesis around the column you wish to perform the function on. You can't use the * to list all the columns in the SELECT command, so you will need to write the columns you wish to see out. If you want to rename the column you created with the function use the keyword AS on the SELECT line. This video is part of a series of videos with the purpose of learning the SQL language. For more information visit Lecture Snippets at http://lecturesnippets.com.
Views: 3562 Lecture Snippets
FIRST VALUE function in SQL Server
 
02:48
In this video we will discuss FIRST_VALUE function in SQL Server FIRST_VALUE function Introduced in SQL Server 2012 Retrieves the first value from the specified column ORDER BY clause is required PARTITION BY clause is optional Syntax : FIRST_VALUE(Column_Name) OVER (ORDER BY Col1, Col2, ...) FIRST_VALUE function example WITHOUT partitions : In the following example, FIRST_VALUE function returns the name of the lowest paid employee from the entire table. SELECT Name, Gender, Salary, FIRST_VALUE(Name) OVER (ORDER BY Salary) AS FirstValue FROM Employees FIRST_VALUE function example WITH partitions : In the following example, FIRST_VALUE function returns the name of the lowest paid employee from the respective partition. SELECT Name, Gender, Salary, FIRST_VALUE(Name) OVER (PARTITION BY Gender ORDER BY Salary) AS FirstValue FROM Employees Text version of the video http://csharp-video-tutorials.blogspot.com/2015/10/firstvalue-function-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/10/firstvalue-function-in-sql-server_6.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: 31640 kudvenkat
Select and Insert query in SQL | Part 4 | SQL tutorial for beginners | Tech Talk Tricks
 
06:19
Welcome to tech talk tricks and in this video, we will learn about select and insert statement.So stay tuned and watch select and insert query in sql. #TechTalkTricks #RanaSingh The SELECT statement is used to select data from a database. The data returned is stored in a result table, called the result-set. SELECT Syntax: SELECT column1, column2, ...FROM table_name; Here, column1, column2, ... are the field names of the table you want to select data from. If you want to select all the fields available in the table, use the following syntax: SELECT * FROM table_name; At tech talk trick channel you will learn all kind of technology like language,tutorials and amazing computer tips and tricks. insert into table from another table sql server insert into values select sql insert into values insert into sql multiple rows insert into select oracle insert into select mysql insert into table from another table oracle select into sql server ************************************************** Follow Tech Talk Trick on Facebook https://www.facebook.com/techtalktricks ************************************************** Follow tech talk trick on Twitter https://twitter.com/tecktalktrick ************************************************** Follow Tech Talk Tricks on Instagram https://www.instagram.com/techtalktricks ************************************************** Subscribe tech talk tricks on YouTube https://www.youtube.com/techtalktricks *************************************************** 1.How to make your computer start up & shutdown faster https://www.youtube.com/watch?v=3kSjizTn7MM 2.How To Trace Name/Address/Location Of UnKnown Number Easily https://www.youtube.com/watch?v=kyYfOP66l1Y 3.How to make web page print-friendly https://www.youtube.com/watch?v=YPR7JHA0Apk 4.How to Lock Folder Without any software https://www.youtube.com/watch?v=BhEduEM9pws 5.How to enable undo in Gmail https://www.youtube.com/watch?v=g1fOwTQ3zJg 6.How To Recover All Deleted, Formatted, Damaged Files https://www.youtube.com/watch?v=fl3DX6RBoqo 7.How to make Bootable USB pen drive for Windows https://www.youtube.com/watch?v=IXJE859pxWg 8.How to Unlock Android Pattern or Pin Lock without losing data https://www.youtube.com/watch?v=yN4JnAo7SvU 9.how to track a cell phone location for free https://www.youtube.com/watch?v=0kCLyPJ8cM0 10.How to fix or repair pen drive using cmd https://www.youtube.com/watch?v=ny4VhM2TsWM 11.how to get wifi password of neighbor https://www.youtube.com/watch?v=LCFn6IjvnMM 12.How to Send an Email In Future https://www.youtube.com/watch?v=oo84GRHe5Vg 13.How To Setup Wifi Hotspot Without Any Software in Windows 10 https://www.youtube.com/watch?v=6Bzyvs44G50 14.how to download YouTube video without any software https://www.youtube.com/watch?v=RDfDGY3Be9Y 15.HOW TO SET SHUTDOWN TIMER IN WINDOWS OS (HINDI) https://www.youtube.com/watch?v=Vb5Ou7sc4uk 16.How To Convert Word File (Any File Format) to PDF file (Any File Format) https://www.youtube.com/watch?v=Nd0YtV9MwqQ 17.How To Hide Drive of Computer Using Command Prompt (Hindi) https://www.youtube.com/watch?v=AddrPKRGdSk
Views: 1000 Tech Talk Tricks
Retrieving (Select) Data From Table in Oracle Database in Telugu
 
07:28
#KOTHA_ABHISHEK http://sqlintelugu1.blogspot.com select command in sql retrieving data from tables in oracle database youcan download background videos from http://videezy.com http://movietools.info
Views: 665 KOTHA ABHISHEK
08 of  13 - Oracle APEX 5 - List of values (LOV) for a field in a form; display a hidden column
 
13:22
A new series using APEX 18.1 is now available. https://youtu.be/65LExgaQMHI 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: 34663 Jennifer Kreie
oracle mysql select max and return multiple values
 
06:25
Code and details: http://blog.softhints.com/oracle-mysql-select-max-and-return-multiple-values/ another example on max N per group http://blog.softhints.com/mysql-select-n-max-values-per-group/ Mysql group by column and return N max/min rows per group: * get max per group * get minimum per group * use additional constraints * return N per group --------------------------------------------------------------------------------------------------------------------------------------------------------------- If you really find this channel useful and enjoy the content, you're welcome to support me and this channel with a small donation via PayPal and Bitcoin. PayPal donation https://www.paypal.me/fantasyan Bitcoin: 1DBZu6N9JTpRDdc9QChLZnX3v2iVRaQ4ym Programming is a fun! :) Site: www.softhints.com Facebook: www.facebook.com/Softhints/ Twitter: www.twitter.com/SoftwareHints
Views: 21 Softhints
FUNCTIONS IN ORACLE PL/SQL (basic to advance examples)
 
19:50
This video is to understand how to create an oracle pl/sql function, the video demonstrates the use of in, out and in out parameter types. The video also explains on how to call a function from a pl/sql block and from a select statement.
Views: 3532 Kishan Mashru
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: 267692 kudvenkat
Oracle SQL Tutorial 19 - ON DELETE (SET NULL and CASCADE)
 
05:59
Welcome everyone! Something you need to consider when you are creating foreign keys is what happens if you delete the parent? As a reminder, the parent is the row that has the value you are referencing in the row that has a foreign key. Why is this something important to consider? It's important because foreign keys need to protect us from two primary things, unacceptable INSERT statements, and unacceptable DELETE statements. Let's see what happens when we try to insert incorrect data into the table with the foreign key: INSERT INTO projects VALUES (1, 'Update website homepage', 'CalebCurry') The response tells us plainly that there is no such user in the users table. So this works correctly. Deleting data on the other hand works a bit differently because the database does not know what you want to do with the child row when you delete the parent from the parent table. By default, we will get an error message that prevents the parent from being deleted, but there are some other options. How do we configure this? This is where the ON DELETE statement comes in. We add the keywords ON DELETE right after the foreign key and then we can give it the option of CASCADE or SET NULL. CASCADE means that if we delete the parent, we are also going to delete the child. In our situation what that means is that if somebody creates a project in our project table and then that persons account gets deleted, all of the projects he owns will also be deleted. CASCADE: CREATE TABLE projects( project_id NUMBER, Project_name VARCHAR2(50 CHAR) UNIQUE, creator VARCHAR2(50 CHAR) NOT NULL, CONSTRAINT projects_pk PRIMARY KEY (project_id), CONSTRAINT projects_users_fk FOREIGN KEY (creator) REFERENCES users (username) ON DELETE CASCADE ) SET NULL will take the value in the child table and get rid of it. What you are left with is NULL. This means that we have an orphaned child. The first thought you might have is that it is a bad thing to have an orphaned child, but in databases that is not always so. In our application if we had it set to SET NULL, when a user account gets deleted the projects would remain in existence they would just lack a creator. This might be a good thing if you are concerned about the long term survival of a project, this might be the route you want to go. It ultimately depends on the application purpose. If you don't like CASCADE or SET NULL, you can leave the entire ON DELETE statement and just have Oracle throw an error when a parent is deleted. As for us, we are going to use ON DELETE CASCADE. We need to use this with extreme caution. If you are not careful, someday you will run a delete a row and that will cascade through you database deleting a bunch of stuff you didn't want to delete. Stuff happens, so make sure you back up your database every once in eternity. Now, in the last video we started with a database design that had three tables. We've only created two in this video. In the next video we are going to create the next one, which is a little special. Then we'll finish things up by adding some indexes. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me on Patreon! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 13299 Caleb Curry
Oracle SQL: Using the select statement by AskTheOracle.net
 
08:10
Learn the basics of the Oracle SQL SELECT statement in just a few minutes - including how to select multiple columns, how to restrict the rows retrieved and how to change the values of columns as you retrieve them. For more Oracle tutorials, see our website at http://www.asktheoracle.net
Views: 1051 asktheoracle1
How To : Insert Data Into Database In Java Using JDBC With Eclipse IDE
 
11:32
Java Tutorial, how to insert data into oracle database using jDBC with eclipse IDE. Write sample java program using eclipse IDE : https://www.youtube.com/watch?v=_6x8F02pwyE Swapping 2 number without using third variable in java : https://www.youtube.com/watch?v=HXVPu0_6UKw&t=25s
Views: 16785 Aayan Media
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: 15501 radhikaravikumar
How to find out Highest ,Second highest Third highest salary and Nth highest salary in SQL Server
 
07:25
A Chanel Where you can learn about Computer Information and Technology Like Asp.Net C#,Asp.Net MVC,SQL Server,Bootstrap,Oracle and more Website design. Website : http://www.dawacit.com Facebook : https://www.facebook.com/dawacit05 Twitter : https://twitter.com/dawacit How to send email in ASP.NET C# using Gmail smtp server step by step https://youtu.be/rnQphXehu7g How to send email with attachment in Asp.Net through Gmail smtp server,simple steps https://youtu.be/mhRe_we4hhA How to create Navigation bar in Asp.Net with CSS https://youtu.be/xVgtAdxhIxk How to create website using ASP.NET very attractive design https://youtu.be/uAKWaCl-vK4 How to create login and logout in Asp.Net MVC https://youtu.be/7E8IK_eAsWE
Views: 27893 Dawa CIT
ORDER BY Clause in Oracle | Oracle Tutorials for Beginners
 
04:37
Oracle Tutorials for Beginners ORDER BY Clause In Oracle ORDER BY Clause in SQL Oracle Tutorials for Beginners Oracle SQL Introduction #Oracle Tutorisla for Beginners Oracle for Beginners Oracle plsql tutorial for Beginners Oracle plsql tutorial for Beginners Oracle plsql tutorial for Beginners ORDER BY in Oracle SQL ORDER BY in Oracle SQL ORDER BY in Oracle SQL NULLS FIRST in Oracle NULLS FIRST in Oracle NULLS LAST in Oracle NULLS LAST in Order by Clause how order by clause works in oracle oracle order by date oracle sort varchar2 alphabetically oracle order by case multiple columns oracle sql order by specific values order by in oracle w3schools sql order by multiple columns oracle order by column not in select order by in oracle w3schools oracle order by multiple columns oracle sql order by specific values how order by clause works in oracle oracle order by date oracle order by group by sql order by alphabetical order by sql
Views: 312 Oracle PL/SQL World
JDBC tutorial in hindi  lec-7(How to select data from table in oracle)
 
21:07
In this video we have covered how to select data from table using netbeans and oracle database. in next Video we will see how to update data in table in oracle database
Views: 1918 JavaTreePoint
Java- MySQL Connection (Create Table, Insert, Select)
 
09:55
This is a fast tutorial, intended for people who understand java, and the basics of SQL/MySQL who just want to see how to use my-sql-connector. How to create a MySQL Connection in java, then create a table, insert, and select, video 1 of 4. CODE: import java.sql.Connection; import java.sql.DriverManager; public static Connection getConnection() throws Exception{ try{ String driver = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://24.196.52.166:3306/testdb"; String username = "username"; String password = "password"; Class.forName(driver); Connection conn = DriverManager.getConnection(url,username,password); System.out.println("Connected"); return conn; } catch(Exception e){System.out.println(e);} return null; } Download JDBC https://dev.mysql.com/downloads/connector/j/ --06/07/2107
Views: 257334 Steven Byrne
9-Oracle Database - SQL - select conditions between in is null logical operators and or not.avi
 
21:15
Oracle Database - SQL - select where compasion operators conditions between in is null logical operators and or not
Views: 1323 Adel Sabour
PL/SQL tutorial 38: Introduction to PL/SQL functions in Oracle Database
 
05:10
PL/SQL tutorial for beginners Introduction to PL/SQL functions in Oracle Database by Manish Sharma ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/introduction-to-plsql-function Previous Tutorial ► Blocks in Oracle Database https://youtu.be/rbarR4_gaH8 ► ------------------------------------------------------------------------- ►►►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: 42884 Manish Sharma
Multiple Query - Select - Display - Rows | Records - Table Format - Array - PHP MySQLi - Hindi
 
20:09
PHP MySQLi | Multiple Query - Select - Display - Rows | Records - Table Format | Array - Foreach Loop | Fetch Fields - Info | Database Connection OOP - Hindi Download Code - https://goo.gl/EvmFL3
Views: 22526 Mohammedi Computers
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: 162805 Joes2Pros SQL Trainings
How to Join 3 tables in 1 SQL query
 
04:59
Get your first month on the Joes 2 Pros Academy for just $1 with code YOUTUBE1. Visit http://www.joes2pros.com Offer expires July 1, 2015 From the newly released 2 Disc DVD set (SQL Queries Joes 2 Pros Vol2) this video shows how to join 3 tables in 1 query.
Views: 244798 Joes2Pros SQL Trainings
Over clause in SQL Server
 
09:13
over partition by in sql server 2008 sql server over clause partition partition by clause in sql server 2008 over partition by clause in sql In this video we will discuss the power and use of Over clause in SQL Server. The OVER clause combined with PARTITION BY is used to break up data into partitions. Syntax : function (...) OVER (PARTITION BY col1, Col2, ...) The specified function operates for each partition. For example : COUNT(Gender) OVER (PARTITION BY Gender) will partition the data by GENDER i.e there will 2 partitions (Male and Female) and then the COUNT() function is applied over each partition. Any of the following functions can be used. Please note this is not the complete list. COUNT(), AVG(), SUM(), MIN(), MAX(), ROW_NUMBER(), RANK(), DENSE_RANK() etc. Example : SQl Script to create Employees table Create Table Employees ( Id int primary key, Name nvarchar(50), Gender nvarchar(10), Salary int ) Go Insert Into Employees Values (1, 'Mark', 'Male', 5000) Insert Into Employees Values (2, 'John', 'Male', 4500) Insert Into Employees Values (3, 'Pam', 'Female', 5500) Insert Into Employees Values (4, 'Sara', 'Female', 4000) Insert Into Employees Values (5, 'Todd', 'Male', 3500) Insert Into Employees Values (6, 'Mary', 'Female', 5000) Insert Into Employees Values (7, 'Ben', 'Male', 6500) Insert Into Employees Values (8, 'Jodi', 'Female', 7000) Insert Into Employees Values (9, 'Tom', 'Male', 5500) Insert Into Employees Values (10, 'Ron', 'Male', 5000) Go Write a query to retrieve total count of employees by Gender. Also in the result we want Average, Minimum and Maximum salary by Gender. This can be very easily achieved using a simple GROUP BY query as show below. SELECT Gender, COUNT(*) AS GenderTotal, AVG(Salary) AS AvgSal, MIN(Salary) AS MinSal, MAX(Salary) AS MaxSal FROM Employees GROUP BY Gender What if we want non-aggregated values (like employee Name and Salary) in result set along with aggregated values You cannot include non-aggregated columns in the GROUP BY query. SELECT Name, Salary, Gender, COUNT(*) AS GenderTotal, AVG(Salary) AS AvgSal, MIN(Salary) AS MinSal, MAX(Salary) AS MaxSal FROM Employees GROUP BY Gender The above query will result in the following error : Column 'Employees.Name' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause One way to achieve this is by including the aggregations in a subquery and then JOINING it with the main query as shown in the example below. Look at the amount of T-SQL code we have to write. SELECT Name, Salary, Employees.Gender, Genders.GenderTotals, Genders.AvgSal, Genders.MinSal, Genders.MaxSal FROM Employees INNER JOIN (SELECT Gender, COUNT(*) AS GenderTotals, AVG(Salary) AS AvgSal, MIN(Salary) AS MinSal, MAX(Salary) AS MaxSal FROM Employees GROUP BY Gender) AS Genders ON Genders.Gender = Employees.Gender Better way of doing this is by using the OVER clause combined with PARTITION BY SELECT Name, Salary, Gender, COUNT(Gender) OVER(PARTITION BY Gender) AS GenderTotals, AVG(Salary) OVER(PARTITION BY Gender) AS AvgSal, MIN(Salary) OVER(PARTITION BY Gender) AS MinSal, MAX(Salary) OVER(PARTITION BY Gender) AS MaxSal FROM Employees Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/over-clause-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/over-clause-in-sql-server_29.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: 80182 kudvenkat

Dissertation writing service
Accenture internship cover letter
Examples of a cover letter for a retail job descriptions
What is a cover letter for a resume definition
Futurzwei newsletter formats