Home
Search results “Oracle null last”
96 Oracle 11g Tutorials   NULLS First & NULLS Last (By MrMerchant Co.)
 
02:38
Oracle 11g Complete Tutorials - PART96 Don't forget to subscribe to my channel. (source: Coding Arena). BOOKS FOR REFERENCE. OCA Oracle Database SQL Certified Expert Exam Guide (Exam 1Z0-047) https://amzn.to/2xy71is Learning SQL: Master SQL Fundamentals - https://amzn.to/2QI0DO7 SQL Pocket Guide: A Guide to SQL Usage - https://amzn.to/2NnI1F7 SQL Cookbook: Query Solutions and Techniques for Database Developers - https://amzn.to/2QCzJY2 Oracle Database 12C: The Complete Reference - https://amzn.to/2QHpWjq OCP: Oracle Database 12c Administrator Certified Professional - https://amzn.to/2NqChKU
Views: 2 MrMerchant Co.
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: 303 Oracle PL/SQL World
Lead , Lag ,  First Value , Last Value ,  Keep First , Keep Last | Oracle SQL Tutorial | Mr.Murali
 
43:44
Lead , Lag , First Value , Last Value , Keep First , Keep Last in Oracle SQL | Oracle SQL Tutorial | Mr.Murali ►For Registration : https://goo.gl/r6kJbB ►Call: +91-8179191999 ► Visit Our Website: http://nareshit.in/ http://nareshit.com/ ► About NareshIT: "Naresh IT is the Best Software Training Institute for Hadoop, Salesforce, AWS, DevOps, Sprak, Data Science, Python, Tableau, RPA ,Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in Hyderabad, Chennai and Vijayawada, India which provides online and classroom training classes" ►For Registration : https://goo.gl/r6kJbB ►Call: India- 8179191999, USA- 404-232-9879 Email: [email protected] ►Our Online Training Features: 1.Training with Real-Time Experts 2.Industry Specific Scenario’s 3.Flexible Timings 4.Soft Copy of Material 5.Share Video's of each and every session. Check The Below Links: ►For Course Reg : https://goo.gl/r6kJbB ► Subscribe to Our Channel: https://goo.gl/q9ozyG ► Circle us on G+: https://plus.google.com/NareshIT ► Like us on Facebook: https://www.facebook.com/NareshIT ► Follow us on Twitter: https://twitter.com/nareshitech ► Visit Our Website: http://nareshit.in/ http://nareshit.com/
Views: 8024 Naresh i Technologies
ORDER BY CLAUSE FOR EXPERT IN ORACLE SQL WITH EXAMPLE
 
13:54
This is a free video tutorial on writing order by clause in an oracle sql statement. This video tutorial demonstrated how we can use column name, column number, expression, function, null first, null last, asc and desc in an order by clause. Also the video tutorial explains the possible cause and the solution to ora-01791: not a selected expression oracle error
Views: 574 Kishan Mashru
Oracle DENSE_RANK Function
 
04:09
https://www.databasestar.com/oracle-dense_rank/ The Oracle DENSE_RANK function allows you to calculate a rank of a row in a group of rows. It returns this rank as a NUMBER value. This function can be used as either an analytic or an aggregate function, and the syntax depends on how you use it. As an aggregate function it looks like this: DENSE_RANK ( expr, [expr(n)] ) WITHIN GROUP ( ORDER BY (order_expr [ASC|DESC] [NULLS FIRST|LAST] ) These parameters are: - expr: this is the value to search for in a particular table. You can specify multiple search values, and just separate them by a comma. - order_expr: this is used to order the expr values by, because you get a different results depending on what order you rank the values in. - NULLS FIRST or LAST: this is where you can specify if you want to have NULL values appear at the top of your ranking order or at the bottom. As an analytic function, it looks like this: DENSE_RANK() OVER ( [query_partition_clause] order_by_clause) The parameters are: - query_partition_clause: this is the expression that the ranking is “grouped” by, as analytic functions allow you to group data within rows. - order_by_clause: this is the expression to order your results by to determine a rank. For this function, if two records have the same sort or rank position, they will have the same RANK value. It won’t cause a gap in the rankings, unlike the RANK function which does cause a gap. For more information about the Oracle DENSE_RANK function, including all of the SQL shown in this video and the examples, read the related article here: https://www.databasestar.com/oracle-dense_rank/
Views: 204 Database Star
ORACLE: How to get FIRST and LAST DAY of  Month ?
 
00:56
SQL Language, available for any version of Oracle Database.
Views: 5345 Database Tutorials
Null Values in Attributes | Database Management System
 
01:22
This lecture explains about Null Values in attributes. To ask your doubts on this topic and much more, click on this Direct Link: http://www.techtud.com/video-lecture/lecture-21 IMPORTANT LINKS: 1) Official Website: http://www.techtud.com/ 2) Virtual GATE(for 'All India Test Series for GATE-2016'): http://virtualgate.in/login/index.php Both of the above mentioned platforms are COMPLETELY FREE, so feel free to Explore, Learn, Practice & Share! Our Social Media Links: Facebook Page: https://www.facebook.com/techtuduniversity Facebook Group: https://www.facebook.com/groups/virtualgate/ Google+ Page: https://plus.google.com/+techtud/posts Last but not the least, SUBSCRIBE our YouTube channel to stay updated about our regularly uploaded new videos.
Views: 17471 Techtud
ORACLE Analytic Functions for Data Warehousing 2/ Arabic
 
12:32
ORACLE Analytic Functions for Data Warehousing 2/ Arabic FIRST_VALUE last_VALUE row_number() --FIRST_VALUE and LAST_VALUE Analytic Functions select EMPLOYEE_ID, FIRST_NAME, HIRE_DATE from employees order by hire_date; select EMPLOYEE_ID, FIRST_NAME, HIRE_DATE , min(HIRE_DATE) over ( ) first_HIRE_DATE from employees select EMPLOYEE_ID, FIRST_NAME, HIRE_DATE , FIRST_VALUE(HIRE_DATE) over ( ) first_HIRE_DATE from employees order by hire_date; select EMPLOYEE_ID, FIRST_NAME, HIRE_DATE , max(HIRE_DATE ) over ( ) last_HIRE_DATE from employees select EMPLOYEE_ID, FIRST_NAME, HIRE_DATE , last_VALUE(HIRE_DATE ) over ( ) last_HIRE_DATE from employees order by HIRE_DATE drop table student_exam_result; CREATE TABLE student_exam_result (student_id number, exame_name varchar2(100), exame_try number, exame_results number ); insert into student_exam_result values(1,'calcluas',1,50); insert into student_exam_result values(1,'calcluas',2,66); insert into student_exam_result values(1,'calcluas',3,20); insert into student_exam_result values(2,'calcluas',1,66); insert into student_exam_result values(2,'calcluas',2,null); insert into student_exam_result values(2,'calcluas',3,7); insert into student_exam_result values(3,'calcluas',1,50); insert into student_exam_result values(3,'calcluas',2,98); insert into student_exam_result values(3,'calcluas',3,null); select * from student_exam_result select student_id, exame_name,exame_try,exame_results, last_value(exame_results) IGNORE NULLS over (PARTITION BY student_id, exame_name ) last_grade from student_exam_result order by student_id, exame_name, exame_try select student_id, exame_name,exame_try,exame_results, last_value(exame_results) IGNORE NULLS over (PARTITION BY student_id, exame_name ) last_grade, max(exame_results) over (PARTITION BY student_id, exame_name ) max_grade, avg(exame_results) over (PARTITION BY student_id, exame_name ) avg_grade from student_exam_result order by student_id, exame_name, exame_try ------------------------ select employee_id,first_name ,row_number() over(order by employee_id ) from employees select employee_id,first_name ,rownum from employees select employee_id,first_name ,department_id, row_number() over(partition by department_id order by employee_id ) from employees
Views: 551 khaled alkhudari
order by clause
 
06:22
When sorting your result set in descending order, you use the DESC attribute in your ORDER BY clause as follows: SELECT supplier_city FROM suppliers WHERE supplier_name = 'Microsoft' ORDER BY supplier_city DESC; This Oracle ORDER BY example would return all records sorted by the supplier_city field in descending order. ORDER BY clause ref/rrefsqlj13658.html An ORDER BY clause allows you to specify the order in which rows appear in the result set. In subqueries, the ORDER BY clause is meaningless unless it is ... Oracle / PLSQL: ORDER BY Clause - TechOnTheNet oracle/order_by.php When sorting your result set in descending order, you use the DESC attribute in your ORDER BY clause as follows: SELECT supplier_city FROM suppliers WHERE supplier_name = 'Microsoft' ORDER BY supplier_city DESC; This Oracle ORDER BY example would return all records sorted by the supplier_city field in descending order. Oracle ORDER BY Clause racle-order-by-clause In Oracle, ORDER BY Clause is used to sort or re-arrange the records in the result set. The ORDER BY clause is only used with SELECT statement. Syntax: SELECT expressions. SQL ORDER BY Clause beginner-sql-tutorial.com/sql-order-by-clause.htm SQL ORDER BY. The ORDER BY clause is used in a SELECT statement to sort results either in ascending or descending order. Oracle sorts query results in ascending order by default. 15 Things You Should Know about the ORDER BY Clause — Oratable acle-order-by-clause/ Sep 3, 2012 - Answers to these questions and more about Oracle's ORDER BY ... ORDER BY DESC places null values at the start of the query results. Oracle ORDER BY tips The Oracle ORDER BY clause must be used if you require that the rows be sorted. The Oracle database, by default, will not sort the results set, nor does it store ... sql - Oracle order by descending with NULL last - Stack Overflow /questions/.../oracle-order-by-descending-with-null-last Jul 14, 2013 - You can use DESC NULLS LAST to achieve that. ... order by case when web_views is not null then 1 else 2 end asc, web_views desc;. Oracle sql order by with case statement 3 answers 10 Jan 2016 oracle - Sql Order by on multiple column 3 answers 15 Dec 2012 Custom Order in Oracle SQL 6 answers 12 Nov 2012 sql - Oracle dynamic DESC and ASC in order by 5 answers 10 Feb 2011 More results fromOracle ORDER BY: Sort Data By One or More Columns in Specified ... Oracle Basics This tutorial shows you how to use the Oracle ORDER BY clause to sort rows by one or more columns in ascending or descending order. Filtering (WHERE) and Sorting Data (ORDER BY) in Oracle 9i ... Nov 5, 2004 - This chapter covers filtering of rows using the WHERE clause and sorting of retrieved data using the ORDER BY clause. The WHERE clause ... Using the SQL ORDER BY clause, SELECT QUERY for alphabetical ... ./Using-the-ORDER-BY-clause-of-the-SELECT-quer... Jul 29, 2008 - Learn how to use the ORDER BY clause of the SELECT query to sort your results in alphabetical order, and how to save your SQL SELECT ... Searches related to order by clause in oracle oracle order by multiple columns how order by clause works in oracle oracle sql order by specific values order by in oracle w3schools group by clause in oracle having clause in oracle oracle order by date order by sql
Views: 21 Muo sigma classes
Oracle LAG & LEAD Functions / Arabic
 
11:23
--The LAG function is used to access data from a previous row --LAG (value_expression [,offset] [,default]) OVER ([query_partition_clause] order_by_clause) --value_expression - Can be a column or a built-in function, except for other analytic functions. --offset - The number of rows preceeding/following the current row, from which the data is to be retrieved. The default value is 1. --default - The value returned if the offset is outside the scope of the window. The default value is NULL. -- The LEAD function is used to return data from the next row. --LEAD (value_expression [,offset] [,default]) OVER ([query_partition_clause] order_by_clause)
Views: 601 khaled alkhudari
Different ways to replace NULL in sql server - Part 15
 
11:42
In this video we will learn about the different ways to replace NULL values in sql server. 1. ISNULL() function 2. CASE statement 3. COALESCE() function Text version of the video http://csharp-video-tutorials.blogspot.com/2012/08/different-ways-to-replace-null-in-sql.html Slides http://csharp-video-tutorials.blogspot.com/2013/08/part-15-different-ways-to-replace-null.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: 258115 kudvenkat
ORACLE SQL AND PL/SQL INTERVIEW QUESTION : SUBQUERY WITH IN / EXISTS OR SELF JOIN
 
09:31
This video demonstrates the solution of the oracle sql interview question like, find the employees where there manager's salary is more than 15000. This is a classic example of using a subquery or a self join to get the result.
Views: 2292 Kishan Mashru
Handling NULL in dynamic LookUp Transformation
 
17:33
Dynamic Lookup-Ignore Null in Comparison how to avoid null values in dynamic lookup Insert null values Ignore Null inputs for Update property
Views: 1008 Adam Tech
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: 31220 kudvenkat
Oracle LENGTH Function
 
01:23
https://www.databasestar.com/oracle-length/ The Oracle LENGTH function allows you to find the length of a string, also known as the number of characters in a string. It’s a common feature in different languages, and SQL is no different. The LENGTH function only has one parameter: LENGTH ( string_value ) The parameter is the string_value which is the value to check the length of. The function returns a number that represents the number of characters in the function. Some points to remember about the Oracle LENGTH function: If string_value is NULL, then LENGTH will return NULL. If string_value is an empty string, the LENGTH will return NULL. The string_value can be any of the character data types - CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, NCLOB. If the string_value is a CHAR data type, then the LENGTH will include any trailing spaces in the value. For more information about the Oracle LENGTH function, including all of the SQL shown in this video and the examples, read the related article here: https://www.databasestar.com/oracle-length/
Views: 269 Database Star
Query without using Like operator find strings?
 
05:28
Hello guys in this video i explain how to find all employee who have a last character is 'N' without using like operator. Oracle database Unbeatable,Unbreakable Platform..
Views: 1879 Oracle World
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: 13156 Caleb Curry
SQL Server 26 - PRIMARY KEY, NOT NULL, UNIQUE
 
03:36
In the last video we created our first table, but I want to give SQL Server some extra information so the database knows more about each of the columns. The first thing is to establish the primary key. To do this all we do is add PRIMARY KEY after the column we want to be the primary key. Simple enough. When we add a constraint right after the column like this, it is often called a column attribute. CREATE TABLE Animals( ID INT PRIMARY KEY, Name VARCHAR(50), Species VARCHAR(50) ); Additionally, if you are using an ID column, it is best to have it labeled as the IDENTITY column. That way, SQL Server will automatically increment the number. CREATE TABLE Animals( ID INT PRIMARY KEY IDENTITY, Name VARCHAR(50), Species VARCHAR(50) ); The other attributes we've discussed in this series are NOT NULL and UNIQUE. We can make the name NOT NULL and the species NOT NULL. We don't have a good column for UNIQUE, so let's add one: CREATE TABLE Animals( ID INT PRIMARY KEY IDENTITY, Name VARCHAR(50) NOT NULL, Species VARCHAR(50) NOT NULL, ContactEmail VARCHAR(50) NOT NULL UNIUQE ); You can see that it is very easy to add multiple column attributes to a column. Just separate them by spaces. The order does not matter. Also, when you say primary key the column is automatically NOT NULL and UNIQUE. There are other attributes you can use including DEFAULT, FOREIGN KEY, and SPARSE. DEFAULT will give a value for a column if you do not put anything in yourself. Foreign keys are used to reference other columns. SPARSE is an attribute we haven't discussed. You can use SPARSE if most of the rows are going to have a NULL for a column and it saves storage space, but we will worry about that in another video. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! 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: 3715 Caleb Curry
Lesson 8 - SQL BETWEEN, IN and More Filtering (Oracle SQL Certification)
 
19:59
In this lesson we continue on from the last lesson and dive deeper into query filtering using the BETWEEN, IN and NULL keywords
Views: 3684 Imtiaz Ahmad
PL/SQL tutorial 66: PL/SQL Collection Method TRIM in Oracle Database
 
07:48
RebellionRider.com presents you the last tutorial in PL/SQL Collection Series. In this tutorial, you will learn how to use Collection Procedure TRIM with the Nested table. Facebook Video: https://www.facebook.com/TheRebellionRider/videos/371155336621176/ ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: http://bit.ly/col-method-trim Previous Tutorial ► PL/SQL Tut 51 Nested Table https://youtu.be/EUYyiFCzU0I ► PL/SQL FOR Loop https://youtu.be/DfAmnj2j7WI ------------------------------------------------------------------------- ►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: 4211 Manish Sharma
Oracle SQL Tutorial 21 - How to Create / Drop Indexes
 
03:58
In the last video, we wrote up the SQL to create three tables: CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR) UNIQUE, CONSTRAINT users_pk PRIMARY KEY (user_id) ); 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 ); CREATE TABLE project_users( project_id NUMBER NOT NULL REFERENCES projects (project_id) ON DELETE CASCADE, user_id NUMBER NOT NULL REFERENCES users (user_id) ON DELETE CASCADE, CONSTRAINT project_users_pk PRIMARY KEY (project_id, user_id) ); I'm going to increase the size of the users table a bit by adding a first and last name column. CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR) UNIQUE, first_name VARCHAR2(50 CHAR), last_name VARCHAR2 (50 CHAR), CONSTRAINT users_pk PRIMARY KEY (user_id) ); But before we finish this design, we should consider indexing certain columns. What columns should we index? Well, as a reminder, the columns that are indexed by default are columns with the UNIQUE constraint, and those that are labeled as primary keys. Columns that are not indexed but often should be are those labeled as a foreign key. The column that jumps out the most to me is the creator column of the project table. It's the only foreign key that is not part of some index. Let's fix this by creating our first index. The way we do that is with the CREATE INDEX command. CREATE INDEX projects_creator_ix ON projects (creator) What naming convention are we following for the index? We are naming it by the table name, followed by an underscore, followed by the column, followed by an underscore, followed by an ix (for index). In this situation it does not apply, but if our foreign key column is labeled as UNIQUE, we can add the UNIQUE keyword like this: CREATE UNIQUE INDEX projects_creator_ix ON projects (creator) Now if you want to get rid of an INDEX, you can use this command: DROP INDEX projects_creator_ix Now, if we want to select data from the user table and the project table we can do that much faster. That's because the foreign key and column it references are both indexed and those are the columns we would do the join on. We will discuss how to do joins in a future video. So what are some potential problems with this database design? Overall, it is pretty good. With this design though we need to make sure there is no way for someone to update a user's username. In the next video we are going to discuss why. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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: 7576 Caleb Curry
SQL: Delete Vs Truncate Vs Drop
 
08:27
In this tutorial, you'll learn the difference between delete/drop and truncate. PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural extension for SQL and the Oracle relational database. PL/SQL is available in Oracle Database (since version 7), TimesTen in-memory database (since version 11.2.1), and IBM DB2 (since version 9.7).[1] Oracle Corporation usually extends PL/SQL functionality with each successive release of the Oracle Database. PL/SQL includes procedural language elements such as conditions and loops. It allows declaration of constants and variables, procedures and functions, types and variables of those types, and triggers. It can handle exceptions (runtime errors). Arrays are supported involving the use of PL/SQL collections. Implementations from version 8 of Oracle Database onwards have included features associated with object-orientation. One can create PL/SQL units such as procedures, functions, packages, types, and triggers, which are stored in the database for reuse by applications that use any of the Oracle Database programmatic interfaces. PL/SQL works analogously to the embedded procedural languages associated with other relational databases. For example, Sybase ASE and Microsoft SQL Server have Transact-SQL, PostgreSQL has PL/pgSQL (which emulates PL/SQL to an extent), and IBM DB2 includes SQL Procedural Language,[2] which conforms to the ISO SQL’s SQL/PSM standard. The designers of PL/SQL modeled its syntax on that of Ada. Both Ada and PL/SQL have Pascal as a common ancestor, and so PL/SQL also resembles Pascal in several aspects. However, the structure of a PL/SQL package does not resemble the basic Object Pascal program structure as implemented by a Borland Delphi or Free Pascal unit. Programmers can define public and private global data-types, constants and static variables in a PL/SQL package.[3] PL/SQL also allows for the definition of classes and instantiating these as objects in PL/SQL code. This resembles usage in object-oriented programming languages like Object Pascal, C++ and Java. PL/SQL refers to a class as an "Abstract Data Type" (ADT) or "User Defined Type" (UDT), and defines it as an Oracle SQL data-type as opposed to a PL/SQL user-defined type, allowing its use in both the Oracle SQL Engine and the Oracle PL/SQL engine. The constructor and methods of an Abstract Data Type are written in PL/SQL. The resulting Abstract Data Type can operate as an object class in PL/SQL. Such objects can also persist as column values in Oracle database tables. PL/SQL is fundamentally distinct from Transact-SQL, despite superficial similarities. Porting code from one to the other usually involves non-trivial work, not only due to the differences in the feature sets of the two languages,[4] but also due to the very significant differences in the way Oracle and SQL Server deal with concurrency and locking. There are software tools available that claim to facilitate porting including Oracle Translation Scratch Editor,[5] CEITON MSSQL/Oracle Compiler [6] and SwisSQL.[7] The StepSqlite product is a PL/SQL compiler for the popular small database SQLite. PL/SQL Program Unit A PL/SQL program unit is one of the following: PL/SQL anonymous block, procedure, function, package specification, package body, trigger, type specification, type body, library. Program units are the PL/SQL source code that is compiled, developed and ultimately executed on the database. The basic unit of a PL/SQL source program is the block, which groups together related declarations and statements. A PL/SQL block is defined by the keywords DECLARE, BEGIN, EXCEPTION, and END. These keywords divide the block into a declarative part, an executable part, and an exception-handling part. The declaration section is optional and may be used to define and initialize constants and variables. If a variable is not initialized then it defaults to NULL value. The optional exception-handling part is used to handle run time errors. Only the executable part is required. A block can have a label. Package Packages are groups of conceptually linked functions, procedures, variables, PL/SQL table and record TYPE statements, constants, cursors etc. The use of packages promotes re-use of code. Packages are composed of the package specification and an optional package body. The specification is the interface to the application; it declares the types, variables, constants, exceptions, cursors, and subprograms available. The body fully defines cursors and subprograms, and so implements the specification. Two advantages of packages are: Modular approach, encapsulation/hiding of business logic, security, performance improvement, re-usability. They support object-oriented programming features like function overloading and encapsulation. Using package variables one can declare session level (scoped) variables, since variables declared in the package specification have a session scope.
Views: 59300 radhikaravikumar
Oracle SQL Tutorial 18 - How to Create Foreign Keys
 
07:09
In this video we are going to be creating foreign keys. I highly recommend watching the previous video before you watch this one. Essentially, we are creating a very simple database for a system where we can create projects and add people to those projects. We started with the users table: --Delete the table if needed: --DROP TABLE users; CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR) UNIQUE, CONSTRAINT users_pk PRIMARY KEY (user_id) ); Now we are going to create a table for projects with a column that is a foreign key to the username. We're going to want to make this match data types: CREATE TABLE projects( project_id NUMBER, project_name VARCHAR2(50 CHAR) UNIQUE, creator VARCHAR2(50 CHAR) ) Next, we need to add the column attributes we decided on last video: CREATE TABLE projects( project_id NUMBER, project_name VARCHAR2(50 CHAR) UNIQUE, creator VARCHAR2(50 CHAR) NOT NULL ) NOT NULL because we want every project to have a creator, but we are not labeling UNIQUE because that means we could only have a specific username once in the table. We want to allow a user to create multiple projects. We also need to add a primary key: CREATE TABLE projects( project_id NUMBER, project_name VARCHAR2(50 CHAR) UNIQUE, creator VARCHAR2(50 CHAR) NOT NULL, CONSTRAINT projects_pk PRIMARY KEY (username) ) Now, the question that remains is, how can I tell Oracle that I want the username to reference the username column of the other table? We have to make a foreign key constraint. As you've learned from the previous videos, there are about three ways to create constraints. You can do it inline at the column level, unnamed. You can do it at the column level, named, and you can do it at the Table level, named. Usually the table-level is preferred, but I will quickly remind you how to do all three again. CREATE TABLE projects( project_id NUMBER, project_name VARCHAR2(50 CHAR) UNIQUE, creator VARCHAR2(50 CHAR) NOT NULL REFERENCES users (username), CONSTRAINT projects_pk PRIMARY KEY (project_id) ) This works, but if we want to name it, we should do this: CREATE TABLE projects( project_id NUMBER, project_name VARCHAR2(50 CHAR) UNIQUE, creator VARCHAR2(50 CHAR) NOT NULL CONSTRAINT projects_users_fk REFERENCES users (username), CONSTRAINT projects_pk PRIMARY KEY (project_id) ) This works, but the preferred method is to do it at the table level: 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) ) Great! So you've learned how to create a foreign key, now we can see it inside of Oracle SQL Developer. One important thing when it comes to foreign keys is what happens when have data in your database and you try to delete the parent row that a row in the child table references? In the next video we are going to configure that using ON DELETE. See you all then and if you enjoy this series, please do me a huge favor by liking the video and subscribing to my YouTube channel. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HELP ME! 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: 18752 Caleb Curry
PL/SQL tutorial 61: Collection Method FIRST & LAST in Oracle Database
 
06:21
------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: http://bit.ly/col-method-3 Previous Tutorial ► Intro of Collection Method: https://youtu.be/8V40IaOkGcU ► Collection Method COUNT: https://youtu.be/NNq80CcC5K8 ► Collection Method EXIST: https://youtu.be/ksfwNxZl4gI ------------------------------------------------------------------------- ►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: 5318 Manish Sharma
Oracle SQL Tutorial 13 - How to Add Column Constraints (Attributes)
 
05:55
So far, we have this table declaration: CREATE TABLE users( user_id NUMBER, username VARCHAR(50 CHAR) first_name VARCHAR2(50 CHAR), last_name VARCHAR2(50 CHAR) ) We can run this command see that it works. As we are learning though, we are going to want to be able to recreate our table with different settings and such, but if you try to run this command, it will complain that the table already exists. So we first need to delete this table before we start editing settings. When we get more experienced, we will learn about ways to edit the structure of a table that already exists. To fix this, we can get rid of the table using the DROP TABLE command: DROP TABLE users You can run this every time if you need to practice by adding a semicolon after it. This is how you can tell Oracle that you are putting in another command after it. This is known as a delimiter. When you run the script, it is going to run both commands. Now we can go through and reconsider our table structure. This is fine for starting out because we don't have any important data in our database, but once your database is in production you are not going to want to just drop tables. In the last video we discussed different constraints that you can apply to columns in a database table, but how do you actually apply these when you are creating a table? The first way you define constraints is to put them right after the column in your CREATE TABLE statement. CREATE TABLE users( username VARCHAR2(50 CHAR) NOT NULL ) When we define constraints this way, we usually say we are adding column attributes. If you have two constraints you want to add, you just put one after the other with spaces in between. There is no particular order that is required. CREATE TABLE users( username VARCHAR2(50 CHAR) NOT NULL UNIQUE ) In this situation we have already given the column the NOT NULL and UNIQUE attributes, so we should consider making this a primary key: CREATE TABLE users( username VARCHAR2(50 CHAR) PRIMARY KEY ) As you can see, adding column attributes is super easy. We can add a default like this: CREATE TABLE users( username VARCHAR2(50 CHAR) PRIMARY KEY, account_balance NUMBER DEFAULT 0 ) Note that now we need the comma after the first row. There are a few constraints we did not talk go through an example, specifically foreign keys and check constraints. We will be adding these constraints to our database in future videos. In the mean time, I have a thought for you… Many people prefer to name their column constraints. That way, we can refer to certain constraints by name. For example, we might have a primary key constraint that could be named users_pk. The way we are creating these constraints does not allow for this feature, so in the next video we are going to be discussing different ways to create constraints. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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: 17685 Caleb Curry
Analytics: 18 Lag, Lead - Dealing with null
 
03:38
blog: https://connor-mcdonald.com Welcome to the KISS video series. Solving problems that typically required complicated SQL in the past, that can now be easily solved with Analytic SQL syntax. In this session, we look at using our IGNORE NULLS extension for lag and lead to solve the "fill in the gaps" problem when rows are missing data. Scripts: https://livesql.oracle.com/apex/livesql/file/content_C0SXW1PG37G8REE0VTQH5LXJ8.html
Views: 200 Connor McDonald
AutoNumber & Identity Columns in oracle / arabic
 
13:14
AutoNumber & Identity Columns in oracle oracle sql plsql AutoNumber in oracle GENERATED ALWAYS AS IDENTITY GENERATED by default AS IDENTITY GENERATED by default on null AS IDENTITY
Views: 423 khaled alkhudari
SQL for Beginners (Part 4) : The ORDER BY Clause
 
02:08
The fourth part of a mini-series of videos showing the basics of SQL. In this episode, we take a look at how you can influence the order of the data that is returned by queries. For more information see: https://oracle-base.com/articles/misc/sql-for-beginners-the-order-by-clause Website: https://oracle-base.com Blog: https://oracle-base.com/blog Twitter: https://twitter.com/oraclebase Cameo by Nelson Calero : Blog: http://databaseindex.blogspot.com/ Twitter: https://twitter.com/ncalerouy Cameo appearances are for fun, not an endorsement of the content of this video.
Views: 713 ORACLE-BASE.com
Oracle Database11g tutorials 12 || SQL Concat Function - SQL character manipulation function
 
04:47
Link for SQL concat function: http://www.rebellionrider.com/SQL-concat-function.htm SQL Concat function/SQL concat() function First function of SQL character manipulation function. Two have in depth knowledge of SQL concatenation operator Please watch my video on SQL concatenation Operator http://youtu.be/PYMeFe72Bas Tool used in this tutorial is command prompt. This tutorial series is part of SQL expert exam certification training. if you are preparing for SQL certification you can use my tutorials. This SQL Tutorial is a part of free training. Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage https://copy.com?r=j7eYO7 Link for SQL function introduction Video 10 http://youtu.be/5rx8Q4x4-qI Link SQL concat Article http://www.rebellionrider.com/SQL-concat-function.htm Contacts E-Mail [email protected] Twitter https://twitter.com/rebellionrider Instagram http://instagram.com/rebellionrider Facebook. https://www.facebook.com/imthebhardwaj Linkedin. in.linkedin.com/in/mannbhardwaj/ Thanks for linking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com -------------------------------------------------------------------------------------------- SQL Concat () function is a Character manipulation function which is a category of SQL character function. We have already discussed the intro of SQL character function in Video 10. You can find link of this video in description below. Ok let's go ahead. SQL Concat () function concatenates two separate character string into one character string. Let's see the syntax Concat (string_1 , String_2) Note here that SQL Concat function takes only two arguments at a time. This SQL Concat function will return string_1 concatenated with string_2. This also means that it will return a single string which is a combined string of parameter String_1 and String_2. Both the parameters of SQL Concat function String_1 and string_2 can be of any data-type. You can even specify the columns of the table here. SQL Concat function is equivalent to the concatenation operator (||). SQL concatenation operator is represented by double solid vertical bars or we can say double pipe signs. Question: How to concatenate more than two strings as SQL Concat that can have only 2 parameters and what is the difference between SQL Concat Function and SQL concatenation operator? The one answer for the second Question What is the Difference between SQL Concat Function and SQL concatenation operator? Is While SQL Concat function takes only two parameters, The Concat operator can be repeated as often as is necessary. Meaning, by the help of SQL Concat operator you can combine as many strings as you want. And Concatenation operator is also not supported by several databases such as SQL server so this might cause problem. To answer the first question How to concatenate more than two strings as SQL Concat that can have only 2 parameters? We will have to jump over SQL developer. Let's see some examples. Say we want to retrieve the full name of an employee from Employees table. Let's try it using SQL Concat function. SELECT Concat (first_name, last_name) AS "Full Name" FROM employees; Here in this query we use two column names - first_name and last_name as arguments of our Concat function Execute. As you can see here, we get full name of our employee but there is no space in between first name and last name. We will see how to format this string using SQL Concat function in a few seconds But before that, let's see how to do the same task using SQL concatenation operator. SELECT first_name ||last_name AS "Full name" FROM employees; As you can see this query also produces the same result. Now we will see how to format full name of employees First we will do this using SQL concatenation Operator. SELECT first_name||' '||last_name AS "Full name" FROM employees; Now you can see we get space between first name and last name of the employee. Again, let's do it using SQL Concat function. Here we will see the nested function concept where we will be using nested Concat function to achieve this formatted string. SELECT Concat (Concat (first_name, ' '), last_name) FROM employees; Inner Concat function has two parameters. These are our first column name first_name and an empty string which will be a space between first name and second name. This Concat will now return a string which is the first name with space. This returning string will be the first input of our Outer Concat and column last_name will be the second input. All together this will give us the desired output. As you can see this method is complex than the first one where we use SQL concatenation operator.
Views: 76188 Manish Sharma
Lead and Lag functions in SQL Server 2012
 
07:27
In this video we will discuss about Lead and Lag functions. Lead and Lag functions Introduced in SQL Server 2012 Lead function is used to access subsequent row data along with current row data Lag function is used to access previous row data along with current row data ORDER BY clause is required PARTITION BY clause is optional Syntax LEAD(Column_Name, Offset, Default_Value) OVER (ORDER BY Col1, Col2, ...) LAG(Column_Name, Offset, Default_Value) OVER (ORDER BY Col1, Col2, ...) Offset - Number of rows to lead or lag. Default_Value - The default value to return if the number of rows to lead or lag goes beyond first row or last row in a table or partition. If default value is not specified NULL is returned. We will use the following Employees table for the examples in this video SQL Script to create the 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', 1000) Insert Into Employees Values (2, 'John', 'Male', 2000) Insert Into Employees Values (3, 'Pam', 'Female', 3000) Insert Into Employees Values (4, 'Sara', 'Female', 4000) Insert Into Employees Values (5, 'Todd', 'Male', 5000) Insert Into Employees Values (6, 'Mary', 'Female', 6000) Insert Into Employees Values (7, 'Ben', 'Male', 7000) Insert Into Employees Values (8, 'Jodi', 'Female', 8000) Insert Into Employees Values (9, 'Tom', 'Male', 9000) Insert Into Employees Values (10, 'Ron', 'Male', 9500) Go Lead and Lag functions example WITHOUT partitions : This example Leads 2 rows and Lags 1 row from the current row. When you are on the first row, LEAD(Salary, 2, -1) allows you to move forward 2 rows and retrieve the salary from the 3rd row. When you are on the first row, LAG(Salary, 1, -1) allows us to move backward 1 row. Since there no rows beyond row 1, Lag function in this case returns the default value -1. When you are on the last row, LEAD(Salary, 2, -1) allows you to move forward 2 rows. Since there no rows beyond the last row 1, Lead function in this case returns the default value -1. When you are on the last row, LAG(Salary, 1, -1) allows us to move backward 1 row and retrieve the salary from the previous row. SELECT Name, Gender, Salary, LEAD(Salary, 2, -1) OVER (ORDER BY Salary) AS Lead_2, LAG(Salary, 1, -1) OVER (ORDER BY Salary) AS Lag_1 FROM Employees Lead and Lag functions example WITH partitions : Notice that in this example, Lead and Lag functions return default value if the number of rows to lead or lag goes beyond first row or last row in the partition. SELECT Name, Gender, Salary, LEAD(Salary, 2, -1) OVER (PARTITION By Gender ORDER BY Salary) AS Lead_2, LAG(Salary, 1, -1) OVER (PARTITION By Gender ORDER BY Salary) AS Lag_1 FROM Employees Text version of the video http://csharp-video-tutorials.blogspot.com/2015/10/lead-and-lag-functions-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/10/lead-and-lag-functions-in-sql-server_5.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: 46801 kudvenkat
Oracle REPLACE Function
 
03:55
https://www.databasestar.com/oracle-replace/ The Oracle REPLACE function is a string manipulation function that allows you to replace one text string with another. It can be a whole word or sentence, or even a single value. The syntax of the REPLACE function is: REPLACE ( whole_string, string_to_replace, [replacement_string]) To use this function, the parameters are: - whole_string (mandatory): This is the string that will be checked for the characters to be replaced. - string_to_replace (mandatory): This is the string that will be searched for within whole_string. - replacement_string (optional): This is the string that will be used to replace occurrences of string_to_replace. Because the last parameter is optional, if it is not specified, then the Oracle REPLACE function removes all occurrences of string_to_replace. You can replace carriage returns with REPLACE, but you’ll need to use the CHR function. You can replace NULL values in Oracle, but this is best done with another function such as NVL, rather than REPLACE. If you want to replace multiple characters, you can do this using nested REPLACE functions or a REGEXP_REPLACE function. For more information about the Oracle REPLACE function, including all of the SQL shown in this video and the examples, read the related article here: https://www.databasestar.com/oracle-replace/
Views: 960 Database Star
Armin van Buuren vs Vini Vici feat. Hilight Tribe - Great Spirit (Extended Mix)
 
07:38
My new single ‘Wild Wild Son‘ (feat. Sam Martin) is OUT NOW ▶ https://AvB.lnk.to/WWSYA Armin van Buuren vs Vini Vici feat. Hilight Tribe - Great Spirit ▶ https://ARMD1325.lnk.to/GSYA Following the ways of the ‘Great Spirit’, Armin van Buuren, Vini Vici and featuring artist Hilight Tribe entrance their followers with a freshly conjured hymn. By calling upon the tempestuous bassline, thrilling melody and tribal chants to do maximum damage, they conjured a piece of marvel that’s sure to fuel the sonic fire. Judging by the global reception, the ‘Great Spirit’ is not the only entity that approves of this offering. #ArminvanBuuren #ViniVici #GreatSpirit
Views: 84648586 Armin van Buuren
Foreign Key | Database Management System
 
06:29
To ask your doubts on this topic and much more, click on this Direct Link: http://www.techtud.com/video-lecture/lecture-foreign-key IMPORTANT LINKS: 1) Official Website: http://www.techtud.com/ 2) Virtual GATE: http://virtualgate.in/login/index.php Both of the above mentioned platforms are COMPLETELY FREE, so feel free to Explore, Learn, Practice & Share! Our Social Media Links: Facebook Page: https://www.facebook.com/techtuduniversity Facebook Group: https://www.facebook.com/groups/virtualgate Google+ Page: https://plus.google.com/+techtud/posts Last but not the least, SUBSCRIBE our YouTube channel to stay updated about the regularly uploaded new videos.
Views: 244161 Techtud
SQL Server 30 - How to INSERT Data
 
05:48
Now that we have our tables created, we need to learn how to actually put data into our tables. That is where the INSERT command comes in. The basic syntax looks like: INSERT INTO TableName VALUES(data…); Data is where we put a value for each column. Strings are single quoted, numbers are left blank with no quotes. Just like when we create tables we try to create the parent tables first, we do the same with inserting data. We always want to insert the parent rows first. So let's add a species to our table. As a reminder, this is what our CREATE TABLE looks like: CREATE TABLE Species( ID INT PRIMARY KEY IDENTITY, Species VARCHAR(50) NOT NULL UNIQUE, FriendlyName VARCHAR(50) NOT NULL ); Now to insert data: INSERT INTO Species VALUES('Pentalagus P. furnessi', 'Bunny'); Now you can see that there may a violation of everything being atomic because we are actually storing the genus and species of this animal in one column. But…YOLO. Now we can view this data by finding the table in the object explorer, right clicking, and selecting Edit Top 200 Rows. Notice that the IDENTITY column is automatically filled. Now, this is a great time to show you some stuff regarding foreign keys. The first thing I want to show you is how they protect our data integrity. Let's insert some data in the Animals table and try to reference an invalid species. Once again, here is what our table creation looks like: CREATE TABLE Animals( ID INT PRIMARY KEY IDENTITY, Name VARCHAR(50) NOT NULL, Species INT NOT NULL REFERENCES Species(ID), ContactEmail VARCHAR(50) NOT NULL UNIQUE ); INSERT INTO Animals VALUES('Sally', 2, '[email protected]'); SQL Server does not let us insert this data. The second thing I wanted to show you is that the name of the constraint that is in violation is being shown here. That is why naming your constraints can come in handy so when this happens you can find it much easier. Last thing is that if you want to INSERT multiple rows, throw a comma after the VALUES, and put another parenthesis with more data: INSERT INTO Animals VALUES('Sally', 1', '[email protected]'), ('Franklin', 1, '[email protected]') ; Maybe someday we will get around to adding a row to our species table for turtles, but for now we are going to make Franklin a bunny. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! 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: 3215 Caleb Curry
Oracle SQL Tutorial 10 - Whitespace, Case Sensitivity, and Comments
 
07:48
SELECT "Hello World" FROM DUAL The first thing you should know about writing queries is that this SQL is not whitespace sensitive. That means we can space this out however we wish. The only requirement is that you do not separate keywords out with spaces. They must be as one entity. Another gotcha is that when you are inside of quotes, whitespace becomes very important. That means if inside of a string you put a character and then 10 spaces, every single one of those spaces is going to part of that string: SELECT "Hello World" FROM DUAL The next thing you should notice is the capitalization. When we type SQL, by convention we capitalize all keywords. I personally really like this because you can easily see the difference between keywords and words that we created or use. But obviously we could capitalize the letters in the quotes. Keep in mind that this is a convention, meaning you do not have to follow this. Oracle is also case insensitive in that SELECT and select both do the same thing. Strings, once again, care about casing. Take this, for example: SELECT 'true' FROM DUALWHERE 'Hello' = 'Hello' And compare the results to this: SELECT 'true' FROM DUALWHERE 'Hello' = 'hello' Only the first one outputs the value true. Once we get into creating database objects such as tables with columns, those are not case sensitive either. That means instead of selecting from DUAL, you can select from DuAl Finally, I shall introduce you to comments. Comments allow you to tell the database engine that you want it to ignore a certain part of your code and not execute it. This is helpful if you want to document your code. It is also useful if you want to have multiple SQL statements open in one tab, but don't want to hover over the one you want to execute. You can comment out the ones you are not using and uncomment them when you are done. Using – will comment out the rest of the line, Using /* */ will comment everything between. This can even be used over multiple lines. But now, let's move onto the important stuff… CREATING TABLES!!!!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HELP ME! 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: 14445 Caleb Curry
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: 179682 kudvenkat
PL/SQL tutorial 60: Collection Method EXISTS in Oracle Database by Manish Sharma
 
05:21
RebellionRider presents you the latest PL/SQL Tutorial 60 on Collection method EXISTS by Manish Sharma ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/exists-function Previous Tutorial ► ------------------------------------------------------------------------- ►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: 6360 Manish Sharma
Basics of jdbc programming Tutorial-6(ResultSet interface part-2)
 
20:12
this video deals with the ResultSet interface and different methods inside in .we came to know about the use of concurrency and updatation in ResultSet object with java codes. import java.sql.*; class Jdbc { public static void main(String args[])throws Exception { Connection con=null; Statement st=null; ResultSet rs=null; String query=null; try { Class.forName("oracle.jdbc.driver.OracleDriver"); con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","student","shubham123"); if(con!=null) { System.out.println("connection established"); st=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); } if(st!=null) { System.out.println("statement object created"); query="select * from emp026"; rs=st.executeQuery(query); if(rs.next()==true) { //getting the record of 3rd row rs.absolute(3); System.out.println("the 3rd row is"); System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3)+" " +rs.getInt(4)+" "+rs.getString(5)+" "+rs.getString(6)); //getting the record of 1st row System.out.println("the 1st row is"); rs.first(); System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3)+" " +rs.getInt(4)+" "+rs.getString(5)+" "+rs.getString(6)); //getting the record of last row System.out.println("the last row is"); rs.last(); System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3)+" " +rs.getInt(4)+" "+rs.getString(5)+" "+rs.getString(6)); } } } catch(SQLException e) { e.printStackTrace(); } catch(ClassNotFoundException e) { e.printStackTrace(); } catch(Exception e) { e.printStackTrace(); } finally { st.close(); con.close(); } } } //updation in ResulSet import java.sql.*; class Jdbc { public static void main(String args[])throws Exception { Connection con=null; Statement st=null; ResultSet rs=null; String query=null; try { Class.forName("oracle.jdbc.driver.OracleDriver"); con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","student","shubham123"); if(con!=null) { System.out.println("connection established"); st=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); } if(st!=null) { System.out.println("statement object created"); query="select salary from emp026 where ename='AMAR'"; rs=st.executeQuery(query); while(rs.next()) { double sal=(rs.getDouble(1)); rs.updateDouble("Salary",sal*1.2); rs.updateRow(); } rs=st.executeQuery("select * from emp026"); while(rs.next()) { System.out.println(rs.getDouble(3)); } } } catch(SQLException e) { e.printStackTrace(); } catch(ClassNotFoundException e) { e.printStackTrace(); } catch(Exception e) { e.printStackTrace(); } finally { st.close(); con.close(); } } }
Views: 145 Learn it by Fun
ORACLE SQL INTERVIEW QUESTION : HOW TO SELECT ODD OR EVEN ROWS FROM A TABLE IN ORACLE
 
03:52
This video tutorial answers the frequently asked interview question, how to select only odd or even records in oracle sql, after watching this video you will understand more on the topic and will be able to answer this interview question with a lot of confidence.
Views: 3606 Kishan Mashru
Filtering on Date Values using the SQL WHERE Clause (Introduction to Oracle SQL)
 
03:36
How to filter on date values in SQL using the SQL WHERE clause. The full Introduction to Oracle SQL course is available here: https://www.databasestar.com/introduction-to-oracle-sql-course/
Views: 145 Database Star
Self join in sql server - Part 14
 
11:19
In this video we will learn about 1. Self Join - Joining a table with itself 2. Self Join is not a different type of join. It can be classified as Inner Self Join, Outer Self Join (Left, Right and Full), or Cross Self Join. Text version of the video http://csharp-video-tutorials.blogspot.com/2012/08/self-join-in-sql-server-part-14.html Slides http://csharp-video-tutorials.blogspot.com/2013/08/part-14-self-join.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: 330060 kudvenkat
What Is A Null Event?
 
00:47
Null event? Math stack exchange. Instance on aix 64bit. Stackexchange questions 0 null event 111664 url? Q webcache. C# is adding (or removing) a null event listener no op? Stack what set? Definition from whatis. Event is null when used with reactjs #2814varghesep opened this issue on apr 28, 2016 3 comments 'null event' wait events occurs intermittently in ash report (doc id 2102027. Event is null when used with reactjs issue #2814 d3 github. Name as you i fire an event from a coroutine of class and subscribe to that handler in b. I am suspecting the issue is related to some older 2003 dcs that are still in mar 7, 2013 iii. Null event' wait events occurs intermittently in ash report. Googleusercontent search. After the event handler is invoked, i get an security log lists null sid for all of these. Last updated on june 12, 2017 'null event' session wait hung sessions oracle server. I don't agree that 'null event' is typically called the impossible event. Should i use null events? V. I am aware this code is a bit messy, i will refactor once have the functionality d3. Or more precisely, since an event is a subset of sample space, the null empty set. Originally posted by martin hi, i am running a production 9. Instance variables and this null in event handler unity answers. What does microsoft windows security auditing event with null react is in setstate callback cheng's blog. Probability if p(a) 0, is a null event? Cross validated. I am local system account's are outside the security subsystem mar 23, 2016 code above prints an event object with nulls set to all of its properties. For a continuous random variable x, the event {x a} is null because it has probability 0 an that impossible. 0 $ is $ a $ a null event? Math stack exchangeevent (probability theory) wikipedia. C# event is null stack overflow. Since you nov 26, 2015 writeline('qaz'); } public class foo { event action blah; Public void onblah() var b If (b ! null) console. Null event' session wait hung sessions oracle server just skins. A single outcome may be an element of many different definition null set, from the stat trek dictionary statistical terms and concepts. What is the difference between 'detection power' and. Null set definition stat trek. However, in some situations, a nonempty event may have probability 0 union of two events and b (a b) the is set space s which do not belong to. Probability if p(a) 0, is a null event? Cross validated stats. Null sid security log event id 4625 when attempting logon to 2008 designefficiency mrc cbu imaging wiki farm. A null event is an that assigned the probability 0 by measure; It not necessarily empty. Null event waiting in v$session_wait dbasupport forumsmodel is null when passed to events laracasts. This statistics glossary includes definitions of all technical terms used on stat may 24, 2013 you're firing the event in constructor, but not adding an handler to until after object is constructed. What is the maximum number of conditions i c
Views: 135 Question Tray
WMB Tutorials | Connecting to Database using WMB or IIB
 
07:48
This video explains how to connect to oracle database using WMB (WebSphere Message Broker) or IIB (IBM Integration Bus). In last video we saw how to configure database on WebSphere message broker or IBM integration bus. In this video we will go forward and write actual code to connect to oracle database to fetch data. We will be sending request with username in it and then based on username we will fetch that users data from oracle database. Service URL http://localhost:7080/services/getUserDetails Request { "username":"user1" } Response { "person_id": 1, "given_name": "Dave", "family_name": "Badger", "title": "Mr", "birth_date": "1960-05-01 00:00:00", "username": "user1" } Dummy Data for Connecting to Database using WMB or IIB Demo CREATE TABLE people ( person_id INTEGER NOT NULL PRIMARY KEY, user_name VARCHAR2(100) NOT NULL, given_name VARCHAR2(100) NOT NULL, family_name VARCHAR2(100) NOT NULL, title VARCHAR2(20), birth_date DATE ); INSERT INTO people VALUES (1, 'user1','Dave', 'Badger', 'Mr', date'1960-05-01'); commit; SELECT * FROM people;
Views: 1369 ProjectsGeek
SQL: LEAD Function
 
06:30
In this tutorial, you'll learn how to make use of lead function in oracle sql 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: 1755 radhikaravikumar
SQL Tutorial - Window Functions - Lag and Lead
 
08:10
Another video brought to you by BeardedDev, bringing you tutorials on Business Intelligence, SQL Programming and Data Analysis. In this video I talk about using Lag and Lead in Windows Functions. This video covers the requirements to pass the exam: If you would like to follow along with the tutorial please run the SQL below: IF OBJECT_ID(N'dbo.Sales', N'U') IS NOT NULL DROP TABLE dbo.Sales; GO CREATE TABLE dbo.Sales ( Sales_Id INT NOT NULL IDENTITY(1, 1) CONSTRAINT PK_Sales_Sales_Id PRIMARY KEY , Sales_Customer_Id INT NOT NULL , Sales_Date DATETIME2 NOT NULL , Sales_Amount DECIMAL (16, 2) NOT NULL ) INSERT INTO dbo.Sales (Sales_Customer_Id, Sales_Date, Sales_Amount) VALUES (1, '20180102', 54.99) , (1, '20180103', 72.99) , (1, '20180104', 34.99) , (1, '20180115', 29.99) , (1, '20180121', 67.00) Lag and Lead are useful for performing trend analysis, in the example I show how we can display a customer spending trend. Lag will show the previous value. Lead will show the next value. Lag and Lead accept multiple parameters as demonstrated in the video: LAG([Column], [Offset], [Value if NULL]) The example of LAG and LEAD in the video can be shown by executing the below SQL query: SELECT Sales_Customer_Id , Sales_Date , LAG(Sales_Amount, 2, 0) OVER(PARTITION BY Sales_Customer_Id ORDER BY Sales_Date) AS PrevValue , Sales_Amount , LEAD(Sales_Amount, 2, 0) OVER(PARTITION BY Sales_Customer_Id ORDER BY Sales_Date) AS NextValue FROM dbo.Sales Please feel free to post comments.
Views: 1097 BeardedDev
Sql Server Interview Question And Answer Part 15 (Max Department Wise Salary with EmpDetail)
 
08:22
Max Department Wise Salary with Employee Detail
Views: 4943 SS UNITECH

Custom writing service you
Research scientist cover letter examples
International sales coordinator cover letter
Polizeiwissenschaft newsletter formats
Diversity officer cover letter