Home
Search results “Oracle null value index”
Which Order Should Columns Go in an Index?: Finding All the Red Sweets Part 4
 
06:19
When you create an index on multiple columns there's an important question you need to answer: In which order should you list the columns? This video looks at some of the factors you should consider to help answer this question. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 3930 The Magic of SQL
Oracle - SQL - Not Null Constraint
 
05:14
Oracle - SQL - Not Null Constraint Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
Null: Databases for Developers #10
 
07:42
The null value represents missing or unknown information. But using it brings complications to your SQL. In this video Chris discusses how to work with null to ensure you get the correct results. Further reading: Oracle Database SQL Reference on Nulls: http://docs.oracle.com/database/122/SQLRF/Nulls.htm#SQLRF30037 Null related functions: http://docs.oracle.com/database/122/SQLRF/Single-Row-Functions.htm#SQLRF51187 Is null condition: http://docs.oracle.com/database/122/SQLRF/Null-Conditions.htm#SQLRF52152 Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2581 The Magic of SQL
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: 17705 Techtud
Important concepts on NULL values
 
05:33
Join Discussion:http://www.techtud.com/video-lecture/important-concepts-null-values 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: 4031 Techtud
Oracle - SQL - Primary Key Constraint
 
04:10
Oracle - SQL - Primary Key Constraint Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
Oracle - SQL - Unique Constraint
 
07:50
Oracle - SQL - Unique Constraint Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
SQL tutorial 62: Indexes In Oracle Database By Manish Sharma RebellionRider
 
04:03
Watch and learn concepts of SQL Index In Oracle Database. In this tutorial you will learn about B-Tree Index and Function based Index. ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : Previous Tutorial ► ------------------------------------------------------------------------- ►►►Help Me In Getting A Job◄◄◄ ►Help Me In Getting A Good Job By Connecting With Me on My LinkedIn and Endorsing My Skills. All My Contact Info is Down Below. You Can Also Refer Me To Your Company Thanks ------------------------------------------------------------------------- Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage https://copy.com?r=kb4rc1 -------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! -------------------------------------------------------------------------- Amazon Wishlist: http://bit.ly/wishlist-amazon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider https://www.facebook.com/imthebhardwaj http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ http://rebellionrider.tumblr.com/ http://www.pinterest.com/rebellionrider/ You can also Email me at for E-mail address please check About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 40114 Manish Sharma
43. Not Null Constraint in PL/SQL Oracle
 
03:45
In this video you will learn about Not Null Constraint in PL/SQL Oracle. For Support =========== Email: [email protected] Contact Form: http://www.learninhindi.com/home/contact Our Social Media ================ Facebook: https://www.facebook.com/LearnInHindi Twitter: https://twitter.com/LearnInHindi For Training & Videos ===================== For more videos and articles visit: http://www.learninhindi.com Free Java Programming In Hindi Course ===================================== https://www.youtube.com/playlist?list=PLOZ3jentlCDAwwhMyoLISrxkXTADGp7PH Free Oracle PL/SQL Programming In Hindi Course ============================================== https://www.youtube.com/playlist?list=PLB5DA82419C2D99B6 Free C Programming In Hindi Course ================================== https://www.youtube.com/playlist?list=PLOZ3jentlCDAxKpBLMWogxSdy6BZcsAJq Trips & Tricks Channel ====================== https://www.youtube.com/channel/UCGmLfkuCo-3lHHJXRJ9HUMw Programming in Hindi Channel ============================ https://www.youtube.com/channel/UCudElIDgwNrybeAvXIy1HZQ
Views: 3789 ITORIAN
SQL Constraints - NOT NULL , UNIQUE , PRIMARY KEY , FOREIGN KEY , CHECK , INDEX , default
 
10:17
SQL is a standard Structured query language for storing, manipulating and retrieving data in databases. NOT NULL , UNIQUE , PRIMARY KEY , FOREIGN KEY , CHECK , INDEX , default 1) NOT NULL - Ensures that a column cannot have a NULL value 2) UNIQUE - Ensures that all values in a column are different 3) PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table 4) FOREIGN KEY - Uniquely identifies a row/record in another table. The table containing the foreign key is called the child table, and the table containing the candidate key is called the referenced or parent table. prevents invalid data and destroy links between tables. 5) CHECK - Ensures that all values in a column satisfies a specific condition 6) DEFAULT - Sets a default value for a column when no value is specified 7) INDEX - Used to create and retrieve data from the database very quickly.
Views: 12 R K
Oracle UPPER Function
 
02:32
https://www.databasestar.com/oracle-upper-lower/ The Oracle UPPER function is used to convert a string to an uppercase value. It capitalises a string value. It’s useful for comparing text or string values that may have mixed case, such as user input or data from different tables. The opposite of the UPPER function is the LOWER function (which converts to lower case). The syntax of UPPER is: UPPER(input_string) The input_string is the string value to convert to an upper case value. It can be any of CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The return type is the same as the input type. You can use the UPPER function in a WHERE clause. However, unless you have a function-based index on the column, any indexes won’t be used. For example, if you have an index on first_name, a query that uses “WHERE UPPER(first_name)” won’t use this index. You’ll have to create an index on the UPPER(first_name) for this to be used. It’s not required, but it’s just something to keep in mind. For more information about the Oracle UPPER function, including all of the SQL shown in this video and the examples, read the related article here: https://www.databasestar.com/oracle-upper-lower/
Views: 101 Database Star
SQL Server join :- Inner join,Left join,Right join and full outer join
 
08:11
For more such videos visit http://www.questpond.com See our other Step by Step video series below :- Learn Angular tutorial for beginners https://tinyurl.com/ycd9j895 Learn MVC Core step by step :- http://tinyurl.com/y9jt3wkv Learn MSBI Step by Step in 32 hours:- https://goo.gl/TTpFZN Learn Xamarin Mobile Programming Step by Step :- https://goo.gl/WDVFuy Learn Design Pattern Step by Step in 8 hours:- https://goo.gl/eJdn0m Learn C# Step by Step in 100 hours :- https://goo.gl/FNlqn3 Learn Data structures & algorithm in 8 hours :-https://tinyurl.com/ybx29c5s Learn SQL Server Step by Step in 16 hours:- http://tinyurl.com/ja4zmwu Learn Javascript in 2 hours :- http://tinyurl.com/zkljbdl Learn SharePoint Step by Step in 8 hours:- https://goo.gl/XQKHeP Learn TypeScript in 45 Minutes :- https://goo.gl/oRkawI Learn webpack in 50 minutes:- https://goo.gl/ab7VJi Learn Visual Studio code in 10 steps for beginners:- https://tinyurl.com/lwgv8r8 Learn Tableau step by step :- https://tinyurl.com/kh6ojyo Preparing for C# / .NET interviews start here http://www.youtube.com/watch?v=gaDn-sVLj8Q In this video we will try to understand four important concepts Inner joins,Left join,Right join and full outer joins. We are also distributing a 100 page Ebook ".Sql Server Interview Question and Answers". If you want this ebook please share this video in your facebook/twitter/linkedin account and email us on [email protected] with the shared link and we will email you the PDF.
Views: 828603 Questpond
Oracle SQL Tutorial 20 - How to Create Composite Primary Keys
 
07:02
This video is going to be a tutorial on how to create composite and compound keys. The difference between a composite and compound key is that a composite key can consist of any columns while a compound key has to consist of columns that are all keys themselves. We will be working with a compound key because we are going to be using the an intermediary table that has two foreign keys. The combination of both of the keys have to be unique. First, if we have any other CREATE TABLE commands, we are going to comment those out. We will space out the CREATE TABLE to have each column on a line, then we will add constraints as needed. CREATE TABLE project_users( project_id, user_id ) Now, let's add the data types: CREATE TABLE project_users( project_id NUMBER, user_id NUMBER } Now, what about some column attributes? I'm going to make both of the columns NOT NULL because we always want the rows to have a user and a project: CREATE TABLE project_users( project_id NUMBER NOT NULL, user_id NUMBER NOT NULL } Now, let's add the foreign key constraints. Now, what do we name these? We are going to add a primary key that covers both of these columns, so I'm going to be a sinner and not give these constraints names: CREATE TABLE project_users( project_id NUMBER NOT NULL REFERENCES projects (project_id), user_id NUMBER NOT NULL REFFERENCES users (user_id) ) Now, the way we have it now is that if we delete a project in the project table, and there are any rows in the project_users table, it will throw an error and prevent deletion. I would prefer for it to also delete any project members. That would make sense because if you delete a project we want it to delete the associate between that project and certain users. The same goes for if we delete a user, we want their association with a certain project to be deleted. To do this, we need to add the ON DELETE command: 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, ) Finally, let's learn how to create a compound or composite key. literally, the only difference is that you put a comma and add the second table inside of the parenthesis. 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) ) Now, the combination of project_id and user_id cannot be null, is always unique, and has an index. The only thing we should do now is add a few indexes. We aren't done yet...In the next video we are going to figure out what columns would benefit from indexes and we'll add them to it. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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: 9986 Caleb Curry
SQL Null or Empty   How to Check for Null or Empty Column in SQL Server   SQL Training Online
 
03:41
http://www.sqltrainingonline.com SQL Null or Empty - How to Check for Null or Empty Column in SQL Server - SQL Training Online You can download the sample table script at http://www.sqltrainingonline.com/how-to-filter-for-sql-null-or-empty-string/. In this video, I show you how to filter for a SQL null or empty string. It can be difficult to filter a null because you can't simply compare with an equal sign. You have to use a special IS NULL clause to make the filter work. I also show you how to combine both the SQL Null and Empty String together in a special trick with the isnull SQL Server function. I use SQL Server 2012 to demonstrate the technique. Let me know what you think by commenting or sharing on twitter, facebook, google+, etc. If you enjoy the video, please give it a like, comment, or subscribe to my channel. You can visit me at any of the following: SQL Training Online: http://www.sqltrainingonline.com Twitter: http://www.twitter.com/sql_by_joey Google+: https://plus.google.com/#100925239624117719658/posts LinkedIn: http://www.linkedin.com/in/joeyblue Facebook: http://www.facebook.com/sqltrainingonline
Views: 16334 Joey Blue
26. IS NULL and IS NOT NULL in SQL (Hindi)
 
05:45
Please Subscribe Channel Like, Share and Comment Visit : www.geekyshows.com
Views: 18300 Geeky Shows
Constraints Part-2 NOT NULL , UNIQUE , PRIMARY KEY , FOREIGN KEY , CHECK , INDEX , default
 
13:22
SQL is a standard Structured query language for storing, manipulating and retrieving data in databases. NOT NULL , UNIQUE , PRIMARY KEY , FOREIGN KEY , CHECK , INDEX , default 1) NOT NULL - Ensures that a column cannot have a NULL value 2) UNIQUE - Ensures that all values in a column are different 3) PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table 4) FOREIGN KEY - Uniquely identifies a row/record in another table. The table containing the foreign key is called the child table, and the table containing the candidate key is called the referenced or parent table. prevents invalid data and destroy links between tables. 5) CHECK - Ensures that all values in a column satisfies a specific condition 6) DEFAULT - Sets a default value for a column when no value is specified 7) INDEX - Used to create and retrieve data from the database very quickly.
Views: 7 R K
Database Design 28 - NOT NULL Foreign Key
 
13:13
Donate!: http://bit.ly/DonateCTVM2. Foreign key columns with NOT NULL as a column characteristic will prevent any rows that do not have a parent primary key. This will force a relationship for every column. More content: http://CalebCurry.com Courses for Download: http://www.udemy.com/u/calebcurry/ Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://Twitter.com/calebCurry Subscribe (it's free!): http://bit.ly/PqPyvH Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 10669 Caleb Curry
DBMS - Null Values in SQL
 
02:17
DBMS - Null Values in SQL Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Arnab Chakraborty, Tutorials Point India Private Limited
Unique and Non Unique Indexes in sql server   Part 37
 
11:02
In this video we will learn about 1. What is a Unique Index 2. Difference between unique index and unique constraint Text version of the video http://csharp-video-tutorials.blogspot.com/2012/09/unique-and-non-unique-indexes-part-37.html Slides http://csharp-video-tutorials.blogspot.com/2013/09/part-37-unique-non-unique-indexes.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: 201331 kudvenkat
PL/SQL: Object Type
 
08:31
In this tutorial, you'll learn what is a object type in sql/plsql 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: 12461 radhikaravikumar
Validation Rule: Is Not Null
 
02:30
Validation Rule: Is Not Null
Views: 7413 Perins Elearning
Oracle tutorial : How to create Id with AUTO INCREMENT in Oracle PL SQL
 
08:43
Oracle tutorial: How to create Id with AUTO INCREMENT in Oracle oracle tutorial for beginners sequence in oracle identity key in sql In this Oracle tutorial , we can create an auto increment field using ‘sequence’ object that can be assigned as primary keys. Using Oracle ‘sequence’ object, you can generate new values for a column. An Oracle sequence is an object like a table or a stored procedure. Examples CREATE SEQUENCE SYSTEM.MYSEQ START WITH 1 MAXVALUE 999999999999999999999999999 MINVALUE 1 NOCYCLE CACHE 20 NOORDER; CREATE OR REPLACE TRIGGER TR_CITY BEFORE INSERT ON CITY FOR EACH ROW BEGIN SELECT LPAD(LTRIM(RTRIM(TO_CHAR(myseq.NEXTVAL))),10,'0') INTO :NEW.id FROM DUAL; END; / Subscribe on youtube: https://www.youtube.com/channel/UCpiyAesWNYOXSz5GPq8lbkA For more tutorial please visit #techquerypond https://techquerypond.wordpress.com https://twitter.com/techquerypond identity column
Views: 8967 Tech Query Pond
8-Oracle Database - SQL - select distinct computed fields Expressions Operators Precedence etc
 
28:12
8-Oracle Database - SQL - select distinct computed fields Expressions Operators Precedence Nested Order by Alias Null Value with Arithmetic null concatenation operator
Views: 1434 Adel Sabour
PL/SQL: Weak Vs Strong RefCursor && Normal cursor Vs RefCursor
 
10:26
In this tutorial, you'll learn Weak Vs Strong Ref Cursor && Normal cursor Vs Ref Cursor... 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: 8692 radhikaravikumar
PL/SQL: Collections Part-1
 
06:13
In this tutorial, you'll learn the introduction to collections. 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: 14402 radhikaravikumar
PL/SQL tutorial 57: PL/SQL Collection Associative Array in Oracle Database
 
08:05
Manish Sharma from RebellionRider presents you the latest PL/SQL tutorial on Collection ASSOCIATIVE ARRAY. In this video, you will learn – - What are Associative Arrays? - How to create Associative Arrays? - How to Insert & Update the data of Associative Array and - How to retrieve the data from an Associative array using two different ways? So if you are wondering whether associative array is a persistent form of collection or not; Is it bounded or unbounded in nature; why should we use this specific collection over others such as VARRAY or Nested Table; What are the differences or similarities between associative array and other collections? Then go ahead and watch the video to find out the answers to all these questions. Hope you will enjoy watching. Do make sure to Like and Share this post/video because that will help others in learning as well as help me and my channel in reaching out. This way we can educate more and more people for FREE. Most importantly SUBSCRIBE to the channel as many such interesting tutorials are coming your way. Thanks. ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: http://bit.ly/associative-array Previous Tutorial ►While Loop: https://youtu.be/IIlc4Sr7kFE ------------------------------------------------------------------------- ►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: 11672 Manish Sharma
PL/SQL Tutorial | COALESCE Function in Oracle Database
 
05:31
Learn fetching all non-null expression using oracle Coalesce function with example. If all expressions evaluate to null, then the COALESCE function will return null. Coalesce function in Oracle, What is coalesce function, When to use coalesce function, How to use coalesce function in oracle, How to fetch non-null values in oracle using coalesce, Linkedin: https://www.linkedin.com/in/aditya-kumar-roy-b3673368/ Facebook: https://www.facebook.com/SpecializeAutomation/
A Story of Index Only Scans: Finding all the Red Sweets Part 3
 
05:25
So far in the red candy series, Chris has compared using an index to a full table scan to access sweets from his table. In this video he asks a different question: What if you just want to count how many sweets are red? In this case the index holds all the information Oracle needs to answer the query. He shows how the optimizer is able to process this via an index only scan. Chris goes on to investigate index only scans further. He discusses how theses can provide better performance than queries accessing the table itself. He finishes by looking at the conditions necessary to enable these. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 1683 The Magic of SQL
PL/SQL: Sysrefcoursor
 
08:07
In this tutorial, you'll learn how to make us of sys_refcursor 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: 6352 radhikaravikumar
C# Tutorial 11:Database values in textbox if select Combobox
 
12:15
------------------Online Courses to learn---------------------------- Java - https://bit.ly/2H6wqXk C++ - https://bit.ly/2q8VWl1 AngularJS - https://bit.ly/2qebsLu Python - https://bit.ly/2Eq0VSt C- https://bit.ly/2HfZ6L8 Android - https://bit.ly/2qaRSAS Linux - https://bit.ly/2IwOuqz AWS Certified Solutions Architect - https://bit.ly/2JrGoAF Modern React with Redux - https://bit.ly/2H6wDtA MySQL - https://bit.ly/2qcF63Z ----------------------Follow--------------------------------------------- My Website - http://www.codebind.com My Blog - https://goo.gl/Nd2pFn My Facebook Page - https://goo.gl/eLp2cQ Google+ - https://goo.gl/lvC5FX Twitter - https://twitter.com/ProgrammingKnow Pinterest - https://goo.gl/kCInUp Text Case Converter - https://goo.gl/pVpcwL -------------------------Stuff I use to make videos ------------------- Stuff I use to make videos Windows notebook – http://amzn.to/2zcXPyF Apple MacBook Pro – http://amzn.to/2BTJBZ7 Ubuntu notebook - https://amzn.to/2GE4giY Desktop - http://amzn.to/2zct252 Microphone – http://amzn.to/2zcYbW1 notebook mouse – http://amzn.to/2BVs4Q3 ------------------Facebook Links ---------------------------------------- http://fb.me/ProgrammingKnowledgeLearning/ http://fb.me/AndroidTutorialsForBeginners http://fb.me/Programmingknowledge http://fb.me/CppProgrammingLanguage http://fb.me/JavaTutorialsAndCode http://fb.me/SQLiteTutorial http://fb.me/UbuntuLinuxTutorials http://fb.me/EasyOnlineConverter ----------------------------------------------------------------------- how to bind combobox to textbox in C# ComboBox and TextBox‎ C# How to show combo box selected value in a text box‎ C# selecting an item in combobox and display corresponding Populate combobox from database C# How to get data in combobox from database? Populating a Combobox from a Dictionary How to fill different ComboBoxes in a DataGridView C# code add database column to datagridview combobox C# Populate combobox from database How to get data in combobox from database? Populating a Combobox from a Dictionary How to fill different ComboBoxes in a DataGridView code add database column to datagridview combobox Enter values into combobox from database‎ Enter values into combobox from database‎ C#
Views: 194316 ProgrammingKnowledge
PL/SQL: Brief on V-arrays
 
03:35
In this tutorial, you'll learn the points to be noted on V-arrays 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: 3729 radhikaravikumar
Treat Null as a Known Value
 
04:56
In this episode we will take a look at using `is distinct from` and it's counterpart `is not distinct from` to treat nulls as known values. To learn more and for full transcript visit us at https://www.pgcasts.com This episode is sponsored by Hashrocket a consultancy specializing in PostgreSQL. Visit us at https://hashrocket.com
Views: 263 PG Casts
PL/SQL: Collections Part-3
 
10:27
In this tutorial, you'll learn you'll learn the continuity of previous collection video. 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: 6718 radhikaravikumar
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: 61549 radhikaravikumar
How to Detect Soft Corruption in Oracle 12c Database
 
18:19
Detection of Soft Corruption in 12c: To use the scripts below replace : , ",# and $ by proper bracket Lets Create a tablespace and small table. SQL: create tablespace DEMO1 datafile '/u02/tstdb1/TSTDB1/datafile/demo01.dbf' size 50M SQL: create table objects tablespace DEMO1 as select * from dba_objects; SQL: alter table objects add constraint pk_obj primary key #object_id$; SQL: create index idx_obj_name on objects#object_name$ tablespace demo1; Backup tablespace. RMAN: backup tablespace DEMO1; We need to put the DB in archivelog first Rebuild index with NOLOGGING option to simulate soft corruption later. RMAN: alter index idx_obj_name rebuild nologging; Confirm that we have datafiles that require backup because they have been affected with NOLOGGING operation. RMAN: report unrecoverable; Simulate corruption. RMAN: alter database datafile 5 offline; RMAN: restore datafile 5; RMAN: recover datafile 5; RMAN: alter database datafile 5 online; Query table with corrupted index and notice error. SQL: select count#*$ from objects where object_name like 'A%'; Let’s perform validation of datafile to check block corruption. RMAN: backup validate check logical datafile 5; Notice that we have 457 blocks marked corrupt but v$database_block_corruption view is empty. SQL: select count#*$ from v$database_block_corruption; Let’s query v$nonlogged_block view. set lines 200 set pages 999 select file#, block#, blocks,object#,reason from v$nonlogged_block; Will RMAN detect that we have corrupted blocks? RMAN: backup datafile 5; RMAN backup won’t fail due to NOLOGGING corrupt blocks and our backup will contain soft corrupted blocks. Let’s Identify corrupt segments using v$nonlogged_block view. set lines 2000 set pages 9999 col owner for a20 col partition_name for a10 col segment_name for a20 SELECT e.owner, e.segment_type, e.segment_name, e.partition_name, c.file# , greatest#e.block_id, c.block#$ corr_start_block# , least#e.block_id+e.blocks-1, c.block#+c.blocks-1$ corr_end_block# , least#e.block_id+e.blocks-1, c.block#+c.blocks-1$ - greatest#e.block_id, c.block#$ + 1 blocks_corrupted FROM dba_extents e, V$NONLOGGED_BLOCK c WHERE e.file_id = c.file# AND e.block_id "= c.block# + c.blocks - 1 AND e.block_id + e.blocks - 1 := c.block# UNION SELECT s.owner, s.segment_type, s.segment_name, s.partition_name, c.file# , header_block corr_start_block# , header_block corr_end_block# , 1 blocks_corrupted FROM dba_segments s, V$NONLOGGED_BLOCK c WHERE s.header_file = c.file# AND s.header_block between c.block# and c.block# + c.blocks - 1 UNION SELECT null owner, null segment_type, null segment_name, null partition_name, c.file# , greatest#f.block_id, c.block#$ corr_start_block# , least#f.block_id+f.blocks-1, c.block#+c.blocks-1$ corr_end_block# , least#f.block_id+f.blocks-1, c.block#+c.blocks-1$ - greatest#f.block_id, c.block#$ + 1 blocks_corrupted FROM dba_free_space f, V$NONLOGGED_BLOCK c WHERE f.file_id = c.file# AND f.block_id "= c.block# + c.blocks - 1 AND f.block_id + f.blocks - 1 := c.block# order by file#, corr_start_block# / This is the best outcome to get if you notice corruption errors. All errors are related to index corruption so we could fix this problem rebuilding index. alter index idx_obj_name rebuild; Simply issuing "alter index rebuild" command won't work. We should mark index unusable to drop segment before rebuilding it or just rebuild index with online option. It is better choice to mark index unusable because you don't need additional space then, but I will simply rebuild index with online option and see what will happen. SQL: alter index idx_obj_name rebuild online; Index altered. SQL: select count#*$ from objects where object_name like 'A%'; No errors... but, let's validate datafile for corruption. RMAN: backup validate check logical datafile 5; Notice "Marked Corrupt" column. Hm... 457 like before. Don't worry, this is not new corruption. These are FREE blocks which will be reused and Oracle will automatically re-format those blocks. Query the v$nonlogged_block view again as given above. We could force re-formatting creating dummy table and inserting data to dummy table. Check Doc ID 336133.1. create table s # n number, c varchar2#4000$ $ nologging tablespace DEMO1; SQL: BEGIN FOR i IN 1..1000000 LOOP INSERT /*+ APPEND */ INTO sys.s select i, lpad#'REFORMAT',3092, 'R'$ from dual; commit ; END LOOP; END; / SQL: drop table sys.s purge; Notice that we don't have corrupted blocks any more. RMAN: backup validate check logical datafile 5;
Views: 145 OracleDBA
mysql tutorial for beginners (6/8) : Indexes
 
05:48
mysql tutorial for beginners (6/8) : Indexes As things stand, the table students works and can be searched without problem by MySQL—until it grows to more than a couple of hundred rows, At that point, database accesses will get slower and slower with every new row added, because MySQL has to search through every row whenever a query is issued. This is like searching through every book in a library whenever you need to look something up. Of course, you don’t have to search libraries that way, because they have either a card index system or, most likely, a database of their own. The way to achieve fast searches is to add an index, either when creating a table or at any time afterward. But the decision is not so simple. For example, there are different index types such as a regular INDEX, PRIMARY KEY, and FULLTEXT. Also, you must decide which columns require an index, a judgment that requires you to predict whether you will be searching any of the data in that column. And even when you’ve decided that, you still have the option of reducing index size by limiting the amount of each column to be indexed. If we imagine the searches that may be made on the students table, it becomes apparent that all of the columns may need to be searched. Anyway, go ahead and add an index to each of the columns, using the commands: ALTER TABLE students ADD INDEX(name(3)); An alternative to using ALTER TABLE to add an index is to use the CREATE INDEX command. They are equivalent, except that CREATE INDEX cannot be used for creating a PRIMARY KEY CREATE INDEX surname ON students (surname(5)); DESCRIBE students; These commands create indexes on both the name and surname columns, limiting name index to only the first 3 characters, and surname index to the first 5 characters. For instance, when MySQL indexes the following name: SAFAA It will actually store in the index only the first 3 characters: SAF This is done to minimize the size of the index, and to optimize database access speed. DESCRIBE command shows the key MUL for each column. This key means that multiple occurrences of a value may occur within that column, which is exactly what we want, as name or surname may appear many times. You don’t have to wait, until after creating a table to add indexes. In fact, doing so can be time-consuming, as adding an index to a large table can take a very long time. Therefore, let’s look at a command that creates the table students with indexes already in place. CREATE TABLE students ( Id_studnet SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(10) NOT NULL, surname VARCHAR(20) NOT NULL, email VARCHAR(30) NOT NULL, INDEX(name(3)), INDEX(surname(5)), ,PRIMARY KEY(id_studnet),UNIQUE(email)); Another important index, PK, its single unique key for each student to enable instant accessing of a row. The importance of having a key with a unique value for each row will come up when we start to combine data from different tables. You can add PK, while you create the table at the first time, or later by issuing the following command: ALTER TABLE students ADD PRIMARY KEY(id_student); The last important index, FULLTEXT index Unlike a regular index, MySQL’s FULLTEXT allows super-fast searches of entire columns of text. It stores every word in every data string in a special index that you can search using “natural language,” in a similar manner to using a search engine. It’s not strictly true that MySQL stores all the words in a FULLTEXT index, because it has a built-in list of more than 500 words that it chooses to ignore because they are so common that they aren’t very helpful for searching anyway. This list, called stopwords, includes the, as, is, of, and so on. The list helps MySQL run much more quickly when performing a FULLTEXT search and keeps database sizes down. FULLTEXT indexes can be created for CHAR, VARCHAR, and TEXT columns only. A FULLTEXT index definition can be given in the CREATE TABLE statement when a table is created, or added later using ALTER TABLE (or CREATE INDEX). Adding a FULLTEXT index to the table students for the columns name and surname ALTER TABLE classics ADD FULLTEXT(name,surname); this index is in addition to the ones already created and does not affect them You can now perform FULLTEXT searches across this pair of columns. If you find that MySQL is running slower than you think it should be when accessing your database, the problem is usually related to your indexes. Either you don’t have an index where you need one, or the indexes are not optimally designed. Tweaking a table’s indexes will often solve such a problem. In the next tutorial, we will learn about, using FOREIGN KEY Constraints and how to join tables together. Subscribe for more: ---------------------------------------------------------------------------- https://www.youtube.com/subscription_center?add_user=saf3al2a SWE.Safaa Al-Hayali - saf3al2a
Views: 26112 Safaa Al-Hayali
Part 12   Can we join two tables without primary foreign key relation
 
10:38
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/09/part-12-can-we-join-two-tables-without.html Can we join two tables without primary foreign key relation Yes, we can join two tables without primary foreign key relation as long as the column values involved in the join can be converted to one type. ID column in Departments table is not the primary Key and DepartmentId column in Employees table is not the foreign key. But we can still join these tables using ID column from Departments table and DepartmentId column from Employees table, as both the columns involved in the join have same data type i.e int. Select Employees.Name as EmployeeName, Departments.Name as DepartmentName from Employees join Departments on Departments.ID = Employees.DepartmentId The obious next question is, if primary foreign key relation is not mandatory for 2 tables to be joined then what is the use of these keys? Primary key enforces uniqueness of values over one or more columns. Since ID is not a primary key in Departments table, 2 or more departments may end up having same ID value, which makes it impossible to distinguish between them based on the ID column value. Foreign key enforces referential integrity. Without foreign key constraint on DepartmentId column in Employees table, it is possible to insert a row into Employees table with a value for DepartmentId column that does not exist in Departments table. The following insert statement, successfully inserts a new Employee into Employees table whose DepartmentId is 100. But we don't have a department with ID = 100 in Departments table. This means this employee row is an orphan row, and the referential integrity is lost as result Insert into Employees values (8, 'Mary', 'Female', 80000, 100) If we have had a foreign key constraint on DepartmentId column in Employees table, the following insert statement would have failed with the following error. Msg 547, Level 16, State 0, Line 1 The INSERT statement conflicted with the FOREIGN KEY constraint. The conflict occurred in database "Sample", table "dbo.Departments", column 'ID'.
Views: 111244 kudvenkat
COALESCE Function in SQL ORACLE Query With Example
 
03:53
ORACLE/PLSQL: COALESCE FUNCTION The Oracle/PLSQL COALESCE function returns the first non-null expression in the list. If all expressions evaluate to null, then the COALESCE function will return null. The syntax for the Oracle/PLSQL COALESCE function is: coalesce( expr1, expr2, ... expr_n ) PARAMETERS: expr1 to expr_n are the expressions to test for non-null values. EXAMPLE: The COALESCE function can be used in Oracle/PLSQL. You could use the coalesce function in a SQL statement as follows: SELECT COALESCE( address1, address2, address3 ) result FROM suppliers; The above COALESCE function is equivalent to the following IF-THEN-ELSE statement: IF address1 is not null THEN result := address1; ELSIF address2 is not null THEN result := address2; ELSIF address3 is not null THEN result := address3; ELSE result := null; END IF; The COALESCE function will compare each value, one by one. Lets apply the same to emp table. We have some NULL values in comm and mgr columns. but not in any other columns. So lets take a example for this 2 columns. COALESCE(comm,mgr,sal) Here if comm is null, function returns mgr value. If mgr is null it returns sal value! Query used in video: SELECT ename,comm,mgr,sal,COALESCE(comm,mgr,sal) result FROM emp;
Views: 6255 WingsOfTechnology
Conditional Operators in Oracle Database | Oracle Tutorials for Beginners
 
07:15
Conditional Operators in Oracle Database | Oracle Tutorials for Beginners Oracle Tutorials for Beginners Conditional Operators in Oracle Database Conditional Operators in Oracle Database Conditional Operators in Oracle SQL Greater than, Less than in Oracle Equal to in Oracle Not Equal to Operator in Oracle conditional operator in oracle conditional operator in oracle conditional operator in oracle Oracle Conditional Operators
Views: 269 Oracle PL/SQL World
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: 27986 techsapphire
Accenture interview questions and answers on PLSQL
 
10:30
PL/SQL: When we give SELECT * FROM EMP; How does oracle respond? What is different between union and minus? What is the relation b/w view and trigger Write a query to get 2nd maximum salary in an employee table ? What is an index and types of indexes. How many number of indexes can be used per table ? What is a constraint. Types of constraints ? What is a trigger ? When we can declare a column as Unique and Not Null both at the same time. What is the use pf Primary Key then? will function return more than one value how what is purge command explain about oracle performance tuning Give an example of any procedure. How will we see framework of a table? What is difference between procedure and function? How to return value using procedure in pl/sql? What is syntax of pl/sql function? What is view? What is Materialized View? What is difference between view and Materialized View? What is package in pl/sql ? What is advantage of package in pl/sql? What is index? What is sequence? What is trigger in pl/sql? What is the use of pl/sql trigger and how many type of trigger? What is synonym in pl/sql? What is collection in pl/sql? How to reduce execution time of any sql query? Do you know about bulk collect and forall? For HCL interview questions : https://www.youtube.com/watch?v=Pf0lRerwF5U For CTS interview questions: https://www.youtube.com/watch?v=ISpHa2IDlaU For Global analytics interview questions: https://www.youtube.com/watch?v=joRTF8ZhVwg&t=45s please subscribe to my channel for more interview questions and answers. https://www.youtube.com/channel/UCofhGV_j_4cVGa9R08MsuXQ thanks to my subscribers and viewers.
Views: 19435 Oracle PL/SQL
Dynamic SQL in Stored Procedure
 
09:32
In this video we will discuss, using dynamic sql in a stored procedure and it's implications from sql injection perspective. We will discuss performance implications of using dynamic sql in a stored procedure in a later video. Text version of the video http://csharp-video-tutorials.blogspot.com/2017/04/dynamic-sql-in-stored-procedure.html Slides http://csharp-video-tutorials.blogspot.com/2017/04/dynamic-sql-in-stored-procedure_11.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 SQL Server Tutorial Videos https://www.youtube.com/playlist?list=PL08903FB7ACA1C2FB 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 Consider the following stored procedure "spSearchEmployees". We implemented this procedure in Part 139 of SQL Server tutorial. This stored procedure does not have any dynamic sql in it. It is all static sql and is immune to sql injection. Create Procedure spSearchEmployees @FirstName nvarchar(100) = NULL, @LastName nvarchar(100) = NULL, @Gender nvarchar(50) = NULL, @Salary int = NULL As Begin Select * from Employees where (FirstName = @FirstName OR @FirstName IS NULL) AND (LastName = @LastName OR @LastName IS NULL) AND (Gender = @Gender OR @Gender IS NULL) AND (Salary = @Salary OR @Salary IS NULL) End Go Whether you are creating your dynamic sql queries in a client application like ASP.NET web application or in a stored procedure, you should never ever concatenate user input values. Instead you should be using parameters. Notice in the following example, we are creating dynamic sql queries by concatenating parameter values, instead of using parameterized queries. This stored procedure is prone to SQL injection. Let's prove this by creating a "Search Page" that calls this procedure. Create Procedure spSearchEmployeesBadDynamicSQL @FirstName nvarchar(100) = NULL, @LastName nvarchar(100) = NULL, @Gender nvarchar(50) = NULL, @Salary int = NULL As Begin Declare @sql nvarchar(max) Set @sql = 'Select * from Employees where 1 = 1' if(@FirstName is not null) Set @sql = @sql + ' and FirstName=''' + @FirstName + '''' if(@LastName is not null) Set @sql = @sql + ' and LastName=''' + @LastName + '''' if(@Gender is not null) Set @sql = @sql + ' and Gender=''' + @Gender + '''' if(@Salary is not null) Set @sql = @sql + ' and Salary=''' + @Salary + '''' Execute sp_executesql @sql End Go Add a Web Page to the project that we have been working with in our previous video. Name it "DynamicSQLInStoredProcedure.aspx". Copy and paste the HTML and code available on my blog at the following link http://csharp-video-tutorials.blogspot.com/2017/04/dynamic-sql-in-stored-procedure.html At this point, run the application and type the following text in the "Firsname" text and click "Search" button. Notice "SalesDB" database is dropped. Our application is prone to SQL injection as we have implemented dynamic sql in our stored procedure by concatenating strings instead of using parameters. ' Drop database SalesDB -- In the following stored procedure we have implemented dynamic sql by using parameters, so this is not prone to sql injecttion. This is an example for good dynamic sql implementation. Create Procedure spSearchEmployeesGoodDynamicSQL @FirstName nvarchar(100) = NULL, @LastName nvarchar(100) = NULL, @Gender nvarchar(50) = NULL, @Salary int = NULL As Begin Declare @sql nvarchar(max) Declare @sqlParams nvarchar(max) Set @sql = 'Select * from Employees where 1 = 1' if(@FirstName is not null) Set @sql = @sql + ' and [email protected]' if(@LastName is not null) Set @sql = @sql + ' and [email protected]' if(@Gender is not null) Set @sql = @sql + ' and [email protected]' if(@Salary is not null) Set @sql = @sql + ' and [email protected]' Execute sp_executesql @sql, N'@FN nvarchar(50), @LN nvarchar(50), @Gen nvarchar(50), @sal int', @[email protected], @[email protected], @[email protected], @[email protected] End Go On the code-behind page, use stored procedure spSearchEmployeesGoodDynamicSQL instead of spSearchEmployeesBadDynamicSQL. We do not have to change any other code. At this point run the application one more time and type the following text in the "Firstname" textbox and click the "Search" button. ' Drop database SalesDB -- Notice "SalesDB" database is not dropped, So in this case our application is not succeptible to SQL injection attack. Summary : Whether you are creating dynamic sql in a client application (like a web application) or in a stored procedure always use parameters instead of concatnating strings. Using parameters to create dynamic sql statements prevents sql injection.
Views: 29355 kudvenkat
Lesson 21 Indexes in SQL Server
 
08:13
In this video we will learn about indexes in SQL Server
Views: 2325 Vijay Mulsaniya
SelectTec | Aula Nº 12 |Create Table Primary key - Oracle SQL Developer
 
07:16
primary key syntax: create table nome_tabela (coluna1 tipo not null, coluna2 tipo, constraint nome_pk primary key (coluna1) );
Views: 3341 SelectTec
CTS interview questions on Oracle SQL and PLSQL
 
06:45
Here are the CTS interview questions on SQL and PLSQL. PL/SQL: What are the activities are you doing daily in your project? Tell me ratio's of sql, pl/sql & Unix? Diff b/w primary key & unique key + not null? What is the use of views? If table dropped, then what happen view? What is index? types of indexes? Which functions are not supported to index? What is save point? What is ora-1555? What are the data types available in pl/sql, not in sql? What is the main use of %type,%rowtype? What is cursor? Types of cursors? Diff b/w explicit cursor & for loop cursor? What is exception? Types of exceptions? What is raise_application_error? How many LONG columns are allowed in a table? What cursor type do you use to retrieve multiple record sets? What is normalization ? What is an index and types of indexes. How many number of indexes can be used per table ? how can we find the select statement is indexed or not? What are wait events. Describe the wait event tables. How do u count no of rows in a table? When do we create bitmap indexes sql query to get zero records from a table having n no of records function can return multiple value? how give give sample coding Difference between NVL, NVL2 and NULLIF Name Salary Abc 50000 Abc 50000 xyz 20000, find the max salary using aggregate function? What are the Diff B/W Cursor and REF Cursor What is pragma_exception_init? Diff b/w triggers & procedures? Can you call procedure in select statement? Restrictions in functions? What is the use of packages? How to drop package body only? Can use pragma_autonamous_tranctions in packages? What is bulk collect? What is nullif()? What is mutating error?  What are the module's , you are working Which will fire default first statement level or row level trigger? What is bulk collect? And any restrictions in bulk collect? What is the use of limit clause in bulk collect? How to debug your code? How to trace error handling? How to find which line error was raised? What are the methods there in save exceptions? What is functional based index? Write syntax? In my next video i will be providing you the answers for each on of this questions. For HCL interview question : https://youtu.be/Pf0lRerwF5U For Global Analytics interview questions : https://youtu.be/joRTF8ZhVwg Please subscribe to my channel here for more videos on recent interview questions of MNC companies. https://www.youtube.com/channel/UCofhGV_j_4cVGa9R08MsuXQ thanks to my subscribers !!
Views: 13475 Oracle PL/SQL
Dynamic SQL in SQL Server
 
12:12
Text version of the video http://csharp-video-tutorials.blogspot.com/2017/03/dynamic-sql-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2017/03/dynamic-sql-in-sql-server_27.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 SQL Server Tutorial Videos https://www.youtube.com/playlist?list=PL08903FB7ACA1C2FB All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists In this video we will discuss 1. What is Dynamic SQL 2. Simple example of using Dynamic SQL What is Dynamic SQL Dynamic SQL is a SQL built from strings at runtime. Simple example of using Dynamic SQL Here is the SQL Script to create Employees table and populate it with data Create table Employees ( ID int primary key identity, FirstName nvarchar(50), LastName nvarchar(50), Gender nvarchar(50), Salary int ) Go 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 One way to achieve this is by implementing a stored procedure as shown below that this page would call. Create Procedure spSearchEmployees @FirstName nvarchar(100), @LastName nvarchar(100), @Gender nvarchar(50), @Salary int As Begin Select * from Employees where (FirstName = @FirstName OR @FirstName IS NULL) AND (LastName = @LastName OR @LastName IS NULL) AND (Gender = @Gender OR @Gender IS NULL) AND (Salary = @Salary OR @Salary IS NULL) End Go The stored procedure in this case is not very complicated as we have only 4 search filters. What if there are 20 or more such filters. This stored procedure can get complex. To make things worse what if we want to specify conditions like AND, OR etc between these search filters. The stored procedure can get extremely large, complicated and difficult to maintain. One way to reduce the complexity is by using dynamic SQL as show below. Depending on for which search filters the user has provided the values on the "Search Page", we build the WHERE clause dynamically at runtime, which can reduce complexity. However, you might hear arguments that dynamic sql is bad both in-terms of security and performance. This is true if the dynamic sql is not properly implemented. From a security standpoint, it may open doors for SQL injection attack and from a performance standpoint, the cached query plans may not be reused. If properly implemented, we will not have these problems with dynamic sql. In our upcoming videos, we will discuss good and bad dynamic sql implementations. For now let's implement a simple example that makes use of dynamic sql. In the example below we are assuming the user has supplied values only for FirstName and LastName search fields. To execute the dynamicl sql we are using system stored procedure sp_executesql. sp_executesql takes two pre-defined parameters and any number of user-defined parameters. @statement - The is the first parameter which is mandatory, and contains the SQL statements to execute @params - This is the second parameter and is optional. This is used to declare parameters specified in @statement The rest of the parameters are the parameters that you declared in @params, and you pass them as you pass parameters to a stored procedure Declare @sql nvarchar(1000) Declare @params nvarchar(1000) Set @sql = 'Select * from Employees where [email protected] and [email protected]' Set @params = '@FirstName nvarchar(100), @LastName nvarchar(100)' Execute sp_executesql @sql, @params, @FirstName='Ben',@LastName='Hoskins' This is just the introduction to dynamic SQL. If a few things are unclear at the moment, don't worry. In our upcoming videos we will discuss the following 1. Implementing a real world "Search Web Page" with and without dynamic SQL 2. Performance and Security implications of dynamic sql. Along the way we will also discuss good and bad dynamic sql implementations. 3. Different options available for executing dynamic sql and their implications 4. Using dynamic sql in stored procedures and it's implications Once we discuss all the above, you will understand 1. The flexibility dynamic sql provides 2. Advantages and disadvantages of dynamic sql 3. When and when not to use dynamic sql
Views: 37451 kudvenkat
SQL Error: Cannot insert the value NULL into column ID
 
02:00
https://codedocu.com/Details?d=2139&a=10&f=352&l=0 System.Data.SqlClient.SqlException occurred HResult=0x80131904 Message=Cannot insert the value NULL into column 'IDDetail', table column does not allow nulls. INSERT fails.
Views: 3758 CodeDocu_com
SQL: Extract function
 
03:38
In this tutorial, you'll learn how to make use of extract function. 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: 3601 radhikaravikumar

Shoe horn sonata essay conclusion transitions
Malaysia is the best place in world essay
Mother teresa essay in gujarati language
Ang nais kong maging trabajo essay scholarships
Tv blessing or curse essay scholarships