Home
Search results “Alter index modify oracle”
Oracle SQL Tutorial 21 - How to Create / Drop Indexes
 
03:58
In the last video, we wrote up the SQL to create three tables: CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR) UNIQUE, CONSTRAINT users_pk PRIMARY KEY (user_id) ); CREATE TABLE projects( project_id NUMBER, Project_name VARCHAR2(50 CHAR) UNIQUE, creator VARCHAR2(50 CHAR) NOT NULL, CONSTRAINT projects_pk PRIMARY KEY (project_id), CONSTRAINT projects_users_fk FOREIGN KEY (creator) REFERENCES users (username) ON DELETE CASCADE ); CREATE TABLE project_users( project_id NUMBER NOT NULL REFERENCES projects (project_id) ON DELETE CASCADE, user_id NUMBER NOT NULL REFERENCES users (user_id) ON DELETE CASCADE, CONSTRAINT project_users_pk PRIMARY KEY (project_id, user_id) ); I'm going to increase the size of the users table a bit by adding a first and last name column. CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR) UNIQUE, first_name VARCHAR2(50 CHAR), last_name VARCHAR2 (50 CHAR), CONSTRAINT users_pk PRIMARY KEY (user_id) ); But before we finish this design, we should consider indexing certain columns. What columns should we index? Well, as a reminder, the columns that are indexed by default are columns with the UNIQUE constraint, and those that are labeled as primary keys. Columns that are not indexed but often should be are those labeled as a foreign key. The column that jumps out the most to me is the creator column of the project table. It's the only foreign key that is not part of some index. Let's fix this by creating our first index. The way we do that is with the CREATE INDEX command. CREATE INDEX projects_creator_ix ON projects (creator) What naming convention are we following for the index? We are naming it by the table name, followed by an underscore, followed by the column, followed by an underscore, followed by an ix (for index). In this situation it does not apply, but if our foreign key column is labeled as UNIQUE, we can add the UNIQUE keyword like this: CREATE UNIQUE INDEX projects_creator_ix ON projects (creator) Now if you want to get rid of an INDEX, you can use this command: DROP INDEX projects_creator_ix Now, if we want to select data from the user table and the project table we can do that much faster. That's because the foreign key and column it references are both indexed and those are the columns we would do the join on. We will discuss how to do joins in a future video. So what are some potential problems with this database design? Overall, it is pretty good. With this design though we need to make sure there is no way for someone to update a user's username. In the next video we are going to discuss why. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me on Patreon! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 7533 Caleb Curry
Oracle - SQL - Alter Table
 
09:02
Oracle - SQL - Alter Table Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
SQL with Oracle 10g XE - Using ALTER TABLE to Modify Table Columns
 
05:23
In this video I use the ALTER TABLE command to modify an existing field column. The command will allow you to change the data types, whether the field can be null, or even the primary key. When using the ALTER TABLE command you would use the keyword MODIFY to make changes to an existing column. Be careful when changing a data type of the null field as existing data may cause an error if not in compliance with the new change. The code I used to alter the Books table is : ALTER TABLE BOOKS MODIFY ISBN_10 VARCHAR(13); This video is part of a series of videos with the purpose of learning the SQL language. For more information visit Lecture Snippets at http://lecturesnippets.com.
Views: 15366 Lecture Snippets
Global Index rebuild scenario in Oracle Database 11g
 
08:41
Why and How we need to rebuild global Index in Oracle 11g
Views: 2802 Athar Fahad
How to Convert a Non-Partitioned Table to Partitioned using Oracle Database 12c R2
 
05:02
Oracle Database 12c Release 2 New Feature! Learn how to convert a non-partitioned table to a partitioned table - Online! This new method - using ALTER TABLE MODIFY - is much simpler than DBMS_REDEFINITION. In this free tutorial from SkillBuilders and Oracle Certified Master DBA John Watson you'll see a demonstration of converting the table and the impact on the underlying table and indexes. See all our free Oracle Database Tutorials at http://www.skillbuilders.com/free-oracle-tutorials.
Views: 2846 SkillBuilders
Oracle Database SQL Tutorials 29 :: How to Alter Statement  using SQL ,Add Constraint,column
 
06:38
www.facebook.com/oracle.shohag Email : [email protected] Website : www.oraclebangla.com Topics : How to Alter Statement Object Structure using SQL ,Add Constraint,column add Oracle Database SQL Tutorials | how to Alter a table structure using SQL | Oracle Bangla 2017 How to alter a Table Structure using SQL | Alter statement | SQL tutorials | Oracle Bangla 2017 | HD Oracle SQL Tutorials. how to alter a table using sql
Views: 1072 Oracle Bangla
How to Move Object from one Table Space to Another Table Space? | How to Rebuild the Index ?
 
05:03
This Video will teach you How to Move Object one Table Space to Another | How to Rebuild the Index ? move table from one tablespace to another in oracle 11g oracle move schema to another tablespace oracle how to move objects to another tablespace oracle 11g move schema to another tablespace alter table move tablespace oracle 8i oracle move table script oracle move cluster to new tablespace oracle move table example rebuild index oracle script alter index rebuild online parallel oracle rebuild all indexes oracle index rebuild online vs offline oracle rebuild partitioned index index rebuild oracle best practice index rebuild script in oracle 11g
Views: 793 Oracle PL/SQL World
10 SQL with Oracle 10g XE   Using ALTER TABLE to Modify Table Columns
 
05:23
10 SQL with Oracle 10g XE Using ALTER TABLE to Modify Table Columns
Views: 50 Cambo Movies
Creating And Modifying Stored Procedure In Oracle PL/SQL using SQL Plus
 
17:36
Creating And Modifying Stored Procedure In Oracle PL/SQL. using SQL Plus.
Views: 3944 Subhroneel Ganguly
Create User and Connecting With SQLPLUS in Oracle SQL Developer Using Command Prompt
 
06:08
Facebook : https://www.facebook.com/ala.hassine.10 Email : [email protected] Page Facebook Système Embarqué : https://www.facebook.com/NewEmbeddedSystem ============================= ============================= The commands used in the video : sqlplus / as sysdba CREATE USER Name IDENTIFIED BY password; GRANT ALL PRIVILEGES TO Name; GRANT EXECUTE ANY PROCEDURE TO Name; GRANT UNLIMITED TABLESPACE TO Name; GRANT CREATE SESSION TO Name; CREATE ROLE role_Name; GRANT CREATE ANY TABLE, ALTER ANY TABLE, DROP ANY TABLE TO role_Name; GRANT SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE TO role_Name; GRANT CREATE ANY TRIGGER, ALTER ANY TRIGGER, DROP ANY TRIGGER TO role_Name; GRANT CREATE ANY SEQUENCE, ALTER ANY SEQUENCE, DROP ANY SEQUENCE TO role_Name; GRANT SELECT ANY SEQUENCE TO role_Name; GRANT CREATE ANY INDEX, ALTER ANY INDEX, DROP ANY INDEX TO role_Name; GRANT CREATE ANY PROCEDURE TO role_Name; GRANT role_Name TO Name; exit sqlplus / as sysdba exit sqlplus Name/Password ============================= ============================= CREATE TABLE employee ( empno number PRIMARY KEY, empname varchar2(70) UNIQUE, address varchar2(70), salary number NOT NULL ) ============================= insert into employee values(1,'Ala','Nabeul',1500); insert into employee values(2,'Ahmed','Tunis',2000); insert into employee values(3,'Ritej','Sfax',1700); insert into employee values(4,'Majdi','Sousse',3000); insert into employee values(5,'Raed','Bizert',2500); insert into employee values(6,'Yasser','Mahdia',1900); ============================= select * from employee;
Views: 46 Ala Hassine
How connect Oracle SQL Developer to a local Oracle database
 
06:25
This video shows how to set up a local Oracle database and connect to it with SQL developer. LINKS: Oracle 11g database: http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html Oracle SQL Developer: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
Views: 2975 MineIsPolo
exchange Partition , Move partition in oracle
 
08:42
exchange Partition , Move partition in oracle Possible operations with partitions SQL Tutorial SQL Tutorial for beginners PLSQL Tutorial PLSQL Tutorial for beginners PL/SQL Tutorial PL SQL Tutorial PL SQL Tutorial for beginners PL/SQL Tutorial for beginners Oracle SQL Tutorial Add Drop Rename Split Move ( Moving from Tablespace to tablespace) Exchange (Table to Table(non Partitioned table)) not partitioned only exchanging data (p)
Views: 916 TechLake
[Modifying Indexes] 1 - Modifying an index using the ALTER INDEX statement
 
02:59
Modifying Indexes Given SQL Server tables named Customer_Details and XMLDocument in ABC_Bank database,you will view and practice how to create and modify an index using Transact-SQL commands. 1 - Modifying an index using the ALTER INDEX statement 2 - Create an XML index 3 - Modifying an XML index using ALTER INDEX command. Learn more and source code at : http://www.tutorialspoint.edu.vn/sql-server/163-maintaining-indexes/12611-workshop-maintaining-indexes.html
Views: 432 little fire
Oracle Tutorial - How to add virtual column in oracle 11g
 
07:41
Hello friends in this video i'm going to demonstrate you how to add virtual column in ORACLE 11g step by step. Oracle 11g supports virtual columns which are derived from the other columns in the table. You can use the virtual columns in your queries, you can index them, you can collect the statistics, etc. There are few restrictions on the virtual columns. You cannot write/insert the data into virtual columns. There is no support for index_organized, external, object, cluster, temporary tables.
Views: 1298 OCP Technology
Oracle SQL: How To Modify Data With The Update Statement by AskTheOracle.net
 
06:00
How to modify data in your Oracle database by using the SQL UPDATE statement. For more Oracle tutorials go to http://www.asktheoracle.net
Views: 2667 asktheoracle1
Oracle - SQL - Drop Table
 
01:09
Oracle - SQL - Drop Table Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
Alter database table columns without dropping table   Part 67
 
04:06
In this video, we will discuss, altering a database table column without having the need to drop the table. Let's understand this with an example. Text version of the video http://csharp-video-tutorials.blogspot.com/2013/08/part-67-alter-database-table-columns.html Slides http://csharp-video-tutorials.blogspot.com/2013/09/part-67-alter-database-table-columns.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 We will be using table tblEmployee for this demo. Use the sql script below, to create and populate this table with some sample data. Create table tblEmployee ( ID int primary key identity, Name nvarchar(50), Gender nvarchar(50), Salary nvarchar(50) ) Insert into tblEmployee values('Sara Nani','Female','4500') Insert into tblEmployee values('James Histo','Male','5300') Insert into tblEmployee values('Mary Jane','Female','6200') Insert into tblEmployee values('Paul Sensit','Male','4200') Insert into tblEmployee values('Mike Jen','Male','5500') The requirement is to group the salaries by gender. To achieve this we would write a sql query using GROUP BY as shown below. Select Gender, Sum(Salary) as Total from tblEmployee Group by Gender When you execute this query, we will get an error - Operand data type nvarchar is invalid for sum operator. This is because, when we created tblEmployee table, the "Salary" column was created using nvarchar datatype. SQL server Sum() aggregate function can only be applied on numeric columns. So, let's try to modify "Salary" column to use int datatype. Let's do it using the designer. 1. Right click on "tblEmployee" table in "Object Explorer" window, and select "Design" 2. Change the datatype from nvarchar(50) to int 3. Save the table At this point, you will get an error message - Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created. So, the obvious next question is, how to alter the database table definition without the need to drop, re-create and again populate the table with data? There are 2 options Option 1: Use a sql query to alter the column as shown below. Alter table tblEmployee Alter column Salary int Option 2: Disable "Prevent saving changes that require table re-creation" option in sql server 2008 1. Open Microsoft SQL Server Management Studio 2008 2. Click Tools, select Options 3. Expand Designers, and select "Table and Database Designers" 4. On the right hand side window, uncheck, Prevent saving changes that require table re-creation 5. Click OK
Views: 86486 kudvenkat
Oracle DB 12c - Instance Parameter Change Impact
 
09:41
Oracle DB 12c - Instance Parameter Change Impact Watch more videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Parth Panjabi, Tutorials Point India Private Limited
Oracle - SQL - Foreign Key Constraint
 
06:15
Oracle - SQL - Foreign Key Constraint Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
How to Create, Alter, Resize, Drop Tablespace (Tablespace Management #1)
 
07:37
Hello Today I am showing you how to create tablespace. Alter tablespace datafile using fileid & filename and resize datafile. How to check Tablespace Size. How to check datafile Size in MB. How to drop Tablespace including contents and all Datafiles of these tablespace.
Views: 985 Parag Mahalle
57. Create, Alter and Drop Sequence in Oracle
 
04:38
In this video you will learn about creating, altering and dropping sequence in Oracle. Sequence help us quickly generate next number and used with INSERT statement. It can generate sequence and series of numbers. 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: 18735 ITORIAN
SQL - Alter Add Drop Modify
 
09:41
Curso Oracle PL/SQL Essentials http://bit.ly/1N3upVn Curso Oracle SQL Expert - Certificação 1Z0-047 http://bit.ly/1G4rKWG Curso Oracle Aprendendo SQL - Preparatório exames 1Z0-051/1Z0-061 http://bit.ly/1eqDlsr Curso de Administração de Redes de Computadores http://goo.gl/nXjaXS Neste Curso de SQL aprenda a linguagem universal de banco de dados onde poderá ser aplicada em qualquer SGBD. Para se aprofundar em banco de dados acesse os links da descrição e confira ótimos cursos. Tags: sql cursos gratuitos curso sql banco de dados comandos sql
Views: 939 Cursos Interativos
How to Shrink table in Oracle..
 
11:52
this video will help how to reclaim space from the table.
Views: 1608 oracdb
Clustered vs. Nonclustered Index Structures in SQL Server
 
08:04
Clustered and nonclustered indexes share many of the same internal structures, but they're fundamentally different in nature. Watch Microsoft Certified IT Professional Jon Seigel explain the similarities and differences of clustered and nonclustered indexes, using a real-world example to show how these structures work to improve the performance of SQL queries. Blog post on primary key vs. the clustered index: http://voluntarydba.com/post/2012/10/02/The-Primary-Key-vs-The-Clustered-Index.aspx CREATE INDEX statement reference: http://technet.microsoft.com/en-us/library/ms188783.aspx ALTER INDEX statement reference: http://technet.microsoft.com/en-us/library/ms188388.aspx Index navigation internals by example: http://sqlblog.com/blogs/paul_white/archive/2011/08/09/sql-server-seeks-and-binary-search.aspx Sample index data is from the AdventureWorksLT2008R2 sample database: http://awlt2008dbscript.codeplex.com/releases/view/46169 Visit my channel for more database administration videos: https://www.youtube.com/voluntarydba Subscribe to get notified about my latest videos: https://www.youtube.com/voluntarydba?sub_confirmation=1 Read additional content on my blog: http://voluntarydba.com Follow on Twitter: https://twitter.com/voluntarydba Like on Facebook: https://facebook.com/voluntarydba
Views: 274209 Voluntary DBA
Oracle SQL Tutorial For Beginners | Oracle SQL Online Training - Session 1
 
52:39
Course : Oracle SQL Online Training Mode of Training : Online Duration : 40 Hours Timings : Flexible Oracle SQL Online Training Demo Registration Link : http://svsoftsolutions.com/demo.aspx Introduction to SQL What is SQL? What Can SQL do? RDBMS SQL Syntax Database Tables SQL Statements Overview of Most Important SQL Commands SELECT UPDATE DELETE INSERT CREATE TABLE ALTER TABLE DROP TABLE CREATE INDEX DROP INDEX SQL SELECT Statement SELECT syntax Demo Database SELECT Column Example SELECT * Example SQL Distinct SELECT DISTINCT Statement SELECT DISTINCT Syntax SELECT DISTINCT Example SQL WHERE Clause WHERE Clause WHERE Clause Example Operators in the WHERE Clause SQL AND & OR Operators AND Operator Example OR Operator Example Combining AND & OR SQL ORDER BY ORDER BY Syntax ORDER BY Example ORDER BY DESC Example ORDER BY Several Column Examples SQL Insert Into INSERT INTO Syntax INSERT INTO Examples Insert Data into Specified Columns SQL UPDATE UPDATE Syntax UPDATE Example Watch out UPDATE statement. SQL DELETE DELETE Syntax DELETE Examples Delete All the Data SQL Aliases SQL Alias Syntax for Columns Alias Example for Table Columns Alias Example for Tables. SQL Joins Different SQL JOINs INNER JOIN LEFT OUTER JOIN RIGHT OUTER JOIN FULL OUTER JOIN SQL UNION UNION Syntax UNION Example UNION ALL Syntax UNION ALL Example SQL Insert Into Select INSERT INTO SELECT Syntax INSERT INTO SELECT Examples SQL Create Table CREATE TABLE Syntax CREATE TABLE Example SQL Constraints CREATE TABLE + CONSTRAINT Syntax NOT NULL Constraint UNIQUE Constraint UNIQUE Constraint on CREATE TABLE UNIQUE Constraint on ALTER TABLE To DROP a UNIQUE Constraint PRIMARY KEY Constraint PRIMARY KEY Constraint on CREATE TABLE PRIMARY KEY Constraint on ALTER TABLE To DROP a PRIMARY KEY Constraint FOREIGN KEY Constraint FOREIGN KEY Constraint on CREATE TABLE FOREIGN KEY Constraint on ALTER TABLE To DROP a FOREIGN KEY Constraint CHECK Constraint CHECK Constraint on CREATE TABLE CHECK Constraint on ALTER TABLE To DROP a CHECK Constraint DEFAULT Constraint on CREATE TABLE DEFAULT Constraint on ALTER TABLE To DROP a DEFAULT Constraint SQL Create Index CREATE INDEX Syntax CREATE UNIQUE INDEX Syntax CREATE INDEX Example SQL DROP Command The DROP INDEX Statement The DROP TABLE Statement The DROP DATABASE Statement The TRUNCATE TABLE Statement SQL ALTER Command The ALTER TABLE Statement ALTER TABLE Example Change Data Type Example DROP COLUMN Example SQL VIEWS CREATE VIEW Statement CREATE VIEW Syntax CREATE VIEW Examples CREATE OR REPLACE VIEW Syntax Dropping a View SQL NULL Values Working with NULL Values IS NULL IS NOT NULL SQL NULL Functions NVL COALESCE For more details visit our website : www.svsoftsolutions.com Or reach us @ USA : +1-845-915-8712 (Toll Free), India : +91-9642373173
Views: 799 SV Soft Solutions
Oracle - SQL - Constraints
 
07:11
Oracle - SQL - Constraints Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
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: 59094 radhikaravikumar
Index Rebuild vs. Reorganize
 
05:48
Some of my thoughts about performing either, or any at all. In some cases, I won't use indexes.
Views: 3906 SQLInSix Minutes
Oracle - SQL - Insert Statement
 
09:30
Oracle - SQL - Insert Statement Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
How To Add New Column(Field) in Existing table Using Oracle Database
 
05:56
In this video You will learn how to Add new column after creating a new table or existing tables in oracle database , This video help us adding one or more than columns as per project requirement. add a column add a column in a table add a column in sql add a column in table add a column sql add a column to a table add a column to an existing table add a column to sql table add a column to table add a new column add column add column alter table add column in a table add column in a table oracle add column in existing table add column in oracle add column in sql add column in table add column in table oracle add column in table sql add column into table add column ms sql add column oracle add column oracle sql add column oracle table add column pl sql add column sql add column sql oracle add column sql script add column sql server add column sql server 2008 add column sql server 2012 add column table add column table oracle add column to a table add column to a table sql add column to database add column to existing table add column to existing table sql server add column to oracle table add column to sql add column to sql server table add column to sql table add column to table add column to table oracle add column to table sql add column to table sql server add column to table sql server 2008 add column tsql add field sql add field sql server add field to table sql add new column add new column in existing table add new column in oracle database tables add new column in table sql add new column sql add new column to sql table add new column to table add new column to table oracle add new column to table sql add sql column add table column add to table sql alter a table sql alter table alter column sql alter table change column sql alter table column sql alter table command sql table add column sql table alter sql update table add column sql update table column sqlplus alter table table add column table alter table columns add update add column update column oracle update table add column update table add column oracle update table add column sql
Views: 2340 Programming Lifestyle
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: 9395 Caleb Curry
SelectTec | Aula Nº 28 | Create Index - Oracle SQL Developer
 
07:38
create index syntax: create unique index nome_indice tabela(colula)
Views: 1482 SelectTec
45. Primary Key and Foreign Key Constraints in PL/SQL Oracle
 
12:36
In this video you will learn about Primary Key and Foreign Key Constraints 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: 9097 ITORIAN
ORACLE SQL 45: Create & Drop Sequence
 
06:37
http://studyandshare.wordpress.com/ http://www.facebook.com/groups/studyandsharevn/
Views: 2468 studyandsharevn
DDL Triggers in sql server
 
12:31
ddl trigger example ddl trigger example in sql server ddl triggers can be used to In this video we will discuss DDL Triggers in sql server. In SQL Server there are 4 types of triggers 1. DML Triggers - Data Manipulation Language. Discussed in Parts 43 to 47 of SQL Server Tutorial. 2. DDL Triggers - Data Definition Language 3. CLR triggers - Common Language Runtime 4. Logon triggers What are DDL triggers DDL triggers fire in response to DDL events - CREATE, ALTER, and DROP (Table, Function, Index, Stored Procedure etc...). For the list of all DDL events please visit https://msdn.microsoft.com/en-us/library/bb522542.aspx Certain system stored procedures that perform DDL-like operations can also fire DDL triggers. Example - sp_rename system stored procedure What is the use of DDL triggers If you want to execute some code in response to a specific DDL event To prevent certain changes to your database schema Audit the changes that the users are making to the database structure Syntax for creating DDL trigger CREATE TRIGGER [Trigger_Name] ON [Scope (Server|Database)] FOR [EventType1, EventType2, EventType3, ...], AS BEGIN -- Trigger Body END DDL triggers scope : DDL triggers can be created in a specific database or at the server level. The following trigger will fire in response to CREATE_TABLE DDL event. Use SampleDB Go CREATE TRIGGER trMyFirstTrigger ON Database FOR CREATE_TABLE AS BEGIN Print 'New table created' END To check if the trigger has been created 1. In the Object Explorer window, expand the SampleDB database by clicking on the plus symbol. 2. Expand Programmability folder 3. Expand Database Triggers folder Please note : If you can't find the trigger that you just created, make sure to refresh the Database Triggers folder. When you execute the following code to create the table, the trigger will automatically fire and will print the message - New table created Create Table Test (Id int) The above trigger will be fired only for one DDL event CREATE_TABLE. If you want this trigger to be fired for multiple events, for example when you alter or drop a table, then separate the events using a comma as shown below. ALTER TRIGGER trMyFirstTrigger ON Database FOR CREATE_TABLE, ALTER_TABLE, DROP_TABLE AS BEGIN Print 'A table has just been created, modified or deleted' END Now if you create, alter or drop a table, the trigger will fire automatically and you will get the message - A table has just been created, modified or deleted. The 2 DDL triggers above execute some code in response to DDL events (CREATE_TABLE, ALTER_TABLE, DROP_TABLE). Now let us look at an example of how to prevent users from creating, altering or dropping tables. To do this modify the trigger as shown below. ALTER TRIGGER trMyFirstTrigger ON Database FOR CREATE_TABLE, ALTER_TABLE, DROP_TABLE AS BEGIN Rollback Print 'You cannot create, alter or drop a table' END To be able to create, alter or drop a table, you either have to disable or delete the trigger. To disable trigger 1. Right click on the trigger in object explorer and select "Disable" from the context menu 2. You can also disable the trigger using the following T-SQL command DISABLE TRIGGER trMyFirstTrigger ON DATABASE To enable trigger 1. Right click on the trigger in object explorer and select "Enable" from the context menu 2. You can also enable the trigger using the following T-SQL command ENABLE TRIGGER trMyFirstTrigger ON DATABASE To drop trigger 1. Right click on the trigger in object explorer and select "Delete" from the context menu 2. You can also drop the trigger using the following T-SQL command DROP TRIGGER trMyFirstTrigger ON DATABASE Certain system stored procedures that perform DDL-like operations can also fire DDL triggers. The following trigger will be fired when ever you rename a database object using sp_rename system stored procedure. CREATE TRIGGER trRenameTable ON DATABASE FOR RENAME AS BEGIN Print 'You just renamed something' END The following code changes the name of the TestTable to NewTestTable. When this code is executed, it will fire the trigger trRenameTable sp_rename 'TestTable', 'NewTestTable' The following code changes the name of the Id column in NewTestTable to NewId. When this code is executed, it will fire the trigger trRenameTable sp_rename 'NewTestTable.Id' , 'NewId', 'column' Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/ddl-triggers-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/ddl-triggers-in-sql-server_9.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html 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: 57006 kudvenkat
Oracle - SQL - Data Manipulation Language
 
02:17
Oracle - SQL - Data Manipulation Language Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
CREATE TABLE WITH CONSTRAINTS - ORACLE - SQL
 
20:35
Create table , add constraints : primary key constraint, foreign key constraint, check constraint, unique constraint, specifying the table space for index, modifying table, dropping table Oracle 10g
Views: 9806 R.N.A. Creation
Sql Tutorial - How to create SEQUENCE in Oracle
 
13:44
Hi guys today we understanding about sequence in SQL language how to create and modify sequence and how these are beneficial to speedup the process of insertion.Oracle database Unbeatable,Unbreakable Platform..
Views: 4741 Oracle World
Oracle - SQL - Check Constraint
 
04:15
Oracle - SQL - Check Constraint Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
SQL DROP Statement - DROP TABLE, DROP DATABASE, TRUNCATE TABLE
 
04:13
SQL DROP Statement - DROP TABLE, DROP DATABASE, TRUNCATE TABLE, DROP INDEX SQL tutorial for Beginners in Hindi and English
Oracle - SQL - Create Table
 
08:52
Oracle - SQL - Create Table Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
SEQUENCES IN ORACLE SQL WITH EXAMPLES (asc, desc, cycle, nocycle, cache, nocache)
 
24:39
This video tutorial is to understand the working of sequences in oracle SQL. The video demonstrations explain all the attributes of a create sequence statement such as start with, increment by, maxvalue, nomaxvalue, minvalue, nominvalue, cycle, nocycle, cache, nocache, order, and noorder. All the parameters are explained with appropriate examples so that the user can understand them clearly. For more detail refer to the link: http://plsqlnsql.blogspot.com/2017/01/sequences.html
Views: 1921 Kishan Mashru
Difference between Delete and Truncate and Drop in Oracle Sql
 
14:04
This is a free tutorial on understanding difference between drop, delete and truncate statements. I have tried to cover most of the major difference between all these three statements and have also shown the same with simple and easy to understand examples. Hope it will be helpful to all. If you want more such videos of exciting and amazing 'difference between' concepts, check out the links below : union and union all : https://youtu.be/n9FqQOd8liY char and varchar2 : https://youtu.be/039qzwjWf4k replace and translate : https://youtu.be/HKYF77BGzOE procedure and function : https://youtu.be/q3LmOenL120 in and exists : https://youtu.be/REX4IjRYlFw rank and dense_rank : https://youtu.be/WGSX998hZ9M %type and %rowtype : https://youtu.be/MlLUFeZ_3eM
Views: 1581 Kishan Mashru
Oracle - SQL - Update Statement
 
03:45
Oracle - SQL - Update Statement Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.

Cyberwire newsletter formats
Example of resume cover letters with salary requirements
Drafting cover letter samples
My best paper writing service
Sample cover letter executive director position summary