Home
Search results “Oracle null in unique index”
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.
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: 7629 Caleb Curry
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: 198419 kudvenkat
Differences between primary key and unique key - SQL Server Interview Questions
 
06:07
Hi Friends, In this in this session we are going to learn the differences between primary key and unique key This is one of the most frequently asked sql server interview questions. Before we discuss the difference between primary key and unique key, let's see what a primary key is and what a unique key is. Primary Key: Primary key is a key which uniquely identifies each row/record in the table. This implies if you have a primary key on a table, you can identify each and every row in that table uniquely using primary key. Unique Key: Unique key constraint enforces the uniqueness on the columns in which it is defined. That is Unique key will make sure only unique values are allowed in the columns in which it is defined. Similarities: Both Primary key and unique Key enforces uniqueness on the columns on which they are defined. • Primary key and unique Key columns allow only unique values. • Primary key and unique Key columns will avoid duplicates • Both Primary key and unique Key columns uniquely identifies each row/record in the table Differences: PRIMARY KEY UNIQUE KEY Primary Key Does not allow duplicates Unique key allows only one NULL A table can have only 1 Primary Key A table can have multiple Unique Keys By default Primary Key creates a Unique Clustered Index on the table By default Unique Key creates a Unique Non-Clustered Index on the table. I hope this session is clear and i hope this knowldge should help you in interviews. Please share your valuable comments & sugesstions. Also, subscriber to my channel for more sql server interview questions and answers. Bye bye & Have a good day.
Views: 37237 TheSSScreations
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: 9499 Caleb Curry
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.
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.
4- Oracle DB - Primary Foreign Unique Not Null Check Composite Keys Table Level and Column Level.avi
 
37:25
Oracle DB - Primary Foreign Unique Not Null Check Composite Keys Table Level and Column Level
Views: 2649 Adel Sabour
Oracle SQL Tutorial 19 - ON DELETE (SET NULL and CASCADE)
 
05:59
Welcome everyone! Something you need to consider when you are creating foreign keys is what happens if you delete the parent? As a reminder, the parent is the row that has the value you are referencing in the row that has a foreign key. Why is this something important to consider? It's important because foreign keys need to protect us from two primary things, unacceptable INSERT statements, and unacceptable DELETE statements. Let's see what happens when we try to insert incorrect data into the table with the foreign key: INSERT INTO projects VALUES (1, 'Update website homepage', 'CalebCurry') The response tells us plainly that there is no such user in the users table. So this works correctly. Deleting data on the other hand works a bit differently because the database does not know what you want to do with the child row when you delete the parent from the parent table. By default, we will get an error message that prevents the parent from being deleted, but there are some other options. How do we configure this? This is where the ON DELETE statement comes in. We add the keywords ON DELETE right after the foreign key and then we can give it the option of CASCADE or SET NULL. CASCADE means that if we delete the parent, we are also going to delete the child. In our situation what that means is that if somebody creates a project in our project table and then that persons account gets deleted, all of the projects he owns will also be deleted. CASCADE: CREATE TABLE projects( project_id NUMBER, Project_name VARCHAR2(50 CHAR) UNIQUE, creator VARCHAR2(50 CHAR) NOT NULL, CONSTRAINT projects_pk PRIMARY KEY (project_id), CONSTRAINT projects_users_fk FOREIGN KEY (creator) REFERENCES users (username) ON DELETE CASCADE ) SET NULL will take the value in the child table and get rid of it. What you are left with is NULL. This means that we have an orphaned child. The first thought you might have is that it is a bad thing to have an orphaned child, but in databases that is not always so. In our application if we had it set to SET NULL, when a user account gets deleted the projects would remain in existence they would just lack a creator. This might be a good thing if you are concerned about the long term survival of a project, this might be the route you want to go. It ultimately depends on the application purpose. If you don't like CASCADE or SET NULL, you can leave the entire ON DELETE statement and just have Oracle throw an error when a parent is deleted. As for us, we are going to use ON DELETE CASCADE. We need to use this with extreme caution. If you are not careful, someday you will run a delete a row and that will cascade through you database deleting a bunch of stuff you didn't want to delete. Stuff happens, so make sure you back up your database every once in eternity. Now, in the last video we started with a database design that had three tables. We've only created two in this video. In the next video we are going to create the next one, which is a little special. Then we'll finish things up by adding some indexes. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me on Patreon! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 13337 Caleb Curry
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 - 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.
Tutorial 12- UNIQUE AND NOT NULL CONSTRAINT
 
04:59
Learn about UNIQUE AND NOT NULL CONSTRAINT in PostgreSQL.
Views: 12559 Programming Guru
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: 10 R K
Oracle Database Constraints ON DELETE CASCADE & more
 
05:59
Oracle Database Constraints ON DELETE CASCADE /ON DELETE set null maxvlearn.com
Views: 397 khaled alkhudari
Oracle SQL Tutorial 12 - Intro to Constraints
 
06:13
As I believe I've mentioned in an earlier video, a constraint is basically a rule we can put in our database that prevents someone from putting the wrong data in. It protects our relationships and data integrity. Because the goal of these constraints are to protect our data integrity, you may hear them called integrity constraints. There are many integrity constraints we are going to talk about: NOT NULL UNIQUE PRIMARY KEY FOREIGN KRY CHECK There is also the DEFAULT attribute. These are all keywords we can add to our columns that will change the way the database works with our data and also prevents incorrect data. NOT NULL is a constraint you can put on a column that prevents nulls. A null is the absence of a value. When we say null, we are saying that every single row has to have a value for this column. UNIQUE is a constraint that makes every row have a unique value for this column. Now note, this does not require values to be put it, and it will allow multiple rows to be null. Next, we are going to talk about primary keys. What qualifies a column as a candidate key? First, not a single row should have a null for that column. Second, every row must be unique. The primary key constraint is essentially a combination of the NOT NULL constraint and the UNIQUE constraint. The foreign key constraint sets the requirement that any value in this column for any row must match a row in another column. Check constraints allow us to be more strict with what data is allowed in our database. NOT NULL and UNIQUE give some level of restriction, but what if we want something more specific? For example, what if we only want values between 0 and 100? That is where check constraints come in. When using check constraints, you give a boolean expression. A boolean expression is something that can be evaluated to true or false. It will only insert the row if the value you try to put into the row makes the expression evaluate to true. So if you put in a value too great or small, the expression will be false and the data is not allowed to be entered. The default constraint is a value you can give a column, and if for any reason when the row is created in the table a value is not provided, the default value will be given. So for example, we could have a bank account table where the balance defaults to 0. How do you actually implement these constraints when you are creating a table? In the next video we are going to be adding these to our users table. Please be sure to subscribe! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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: 18034 Caleb Curry
DIFFERENCE BETWEEN PRIMARY KEY AND UNIQUE KEY CONSTRAINT IN ORACLE SQL
 
06:47
This video tutorial explains about the difference between primary key and unique key in oracle sql which is also a to be asked interview quiestion. After watching this video you will be able to explain the difference between both the constraints.
Views: 1781 Kishan Mashru
Table Constraints in SQL: NOT NULL, DEFAULT, UNIQUE, and CHECK
 
03:44
This SQL tutorial discusses the common constraints one can place on a table: NOT NULL, DEFAULT, UNIQUE, and CHECK, including the purpose of each constraint, as well as how to apply each constraint to a table during table creation. 0:24 NOT NULL Constraint 0:56 DEFAULT Constraint 2:03 UNIQUE Constraint 2:34 CHECK Constraint
Views: 8501 1Keydata
Oracle 12C Tutorial 20 - Constraints (Primary, Foreign, Unique, Null etc.)
 
19:41
This Video Tutorial Will Describe about various constraints we can use with tables. Some of the constraints can used as table level or column level so also known as table level constraints and column level constraints. These command will also work on other versions of database like Oracle 11g Database, Oracle 10g Database, Oracle 9i Database, Oracle 8i Database, Oracle 8 Database and so on. In this video i explain Not Null Constraint, Unique key Constraint, Primary Key Constraint, Foreign Key - Reference key Constraint, Check constraint and user_constraints table. Full Syntax will be given in this video tutorial about how to use these constraints. Along with live example to execute Not Null Constraint, Unique key Constraint, Primary Key Constraint, Foreign Key - Reference key Constraint, Check constraint and user_constraints table . All the keywords, format, mandatory clauses etc are described in this video.
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: 9222 ITORIAN
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: 39508 Manish Sharma
Oracle - SQL - Managing Constraints
 
06:01
Oracle - SQL - Managing Constraints Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
NULL Value in Oracle Database | Oracle Tutorials for Beginners
 
03:18
NULL Value in Oracle Database | Oracle Tutorials for Beginners NULL Value in Oracle Database NULL Value in Oracle SQL NULL Value in SQL NULL Value in Oracle Database Oracle Tutorials for Beginners Oracle Tutorials for Beginners Oracle PL/SQL Tutorials for Beginners Oracle PL/SQL Tutorials for Beginners Oracle PL/SQL Tutorials for Beginners how to select null values in oracle oracle compare null values in where clause null=null in oracle how to handle null in case statement in oracle how to check null value in oracle stored procedure oracle nvl null value in oracle query how to check empty column value in oracle how to select null values in oracle oracle is null vs = null oracle nvl oracle is not null oracle decode oracle isnull oracle case when null select null from table in oracle oracle compare null values in where clause oracle select null how to check empty column value in oracle oracle sql not null or empty oracle is not null how to handle null in case statement in oracle oracle isnull oracle nvl
Views: 407 Oracle PL/SQL World
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: 25296 Safaa Al-Hayali
UNIQUE KEY CONSTRAINT IN ORACLE SQL WITH EXAMPLE
 
14:37
This is a free video tutorial by Kishan mashru on unique constraint in Oracle SQL, the video firstly explains what unique constraint is and how it can be used along with its various limitations, then the video gives perfect examples to understand how to create a unique key at the column level or inline, or at the table level i.e out of line. The video gives a demonstration on ALTER TABLE ADD CONSTRAINT and ALTER TABLE DROP CONSTRAINT statements also.
Views: 917 Kishan Mashru
DISTINCT Clause & UNIQUE Keyword in Oracle | Oracle Tutorials for Beginners
 
06:59
DISTINCT & UNIQUE Keyword in Oracle | Oracle Tutorials for Beginners DISTINCT Keyword in Oracle DISTINCT Clause in Oracle UNIQUE Keyword in Oracle UNIQUE Clause in Oracle Oracle Tutorials for Beginners Oracle Tutorials for Beginners select distinct * sql distinct multiple columns sql distinct count select distinct on one column with multiple columns returned select distinct mysql sql count distinct multiple columns oracle distinct count sql distinct group by sql count distinct two columns select distinct on one column with multiple columns returned select distinct on one column with multiple columns returned oracle sql select unique values from multiple columns select distinct multiple columns mysql select distinct all columns sql count distinct multiple columns group by sql select distinct multiple columns group by select distinct oracle select distinct rows sql select distinct multiple columns select distinct on one column select count distinct select unique mysql how to select unique records in oracle without using distinct sql select distinct values and count of each Oracle Tutorials for Beginners Oracle Tutorials for Beginners Oracle Tutorials for Beginners Oracle Tutorials for Beginners
Views: 399 Oracle PL/SQL World
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: 848 SV Soft Solutions
Oracle10g / Constraints (NOT NULL, UNIQUE, CHECK)
 
22:42
التقييدات NOT NULL, UNIQUE, CHECK
Views: 642 Saif Academy
47. UNIQUE KEY in SQL (Hindi)
 
16:42
Please Subscribe Channel Like, Share and Comment Visit : www.geekyshows.com
Views: 16426 Geeky Shows
Unique key constraint - Part 9
 
08:12
In this video we will learn 1. What is unique key constraint 2. When do you use unique key constraint over primary key constraint 3. Difference between unique key constraint and primary key constraint Text version of the video http://csharp-video-tutorials.blogspot.com/2012/08/unique-key-constraint-part-9.html Slides http://csharp-video-tutorials.blogspot.com/2013/08/part-9-unique-key-constraint.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: 278675 kudvenkat
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.
Oracle SQL Tutorial For Beginners | Oracle SQL Online Training - Session 2
 
01:03:12
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: 51 SV Soft Solutions
Constraint In Oracle PL SQL
 
06:47
Constraint In Oracle PL SQL oracle tutorial for beginners A) UNIQUE CONSTRAINT : A unique constraint is uniquely defines a record. Its value is not repeated. It can be null. B)NOT NULL CONSTRAINT: Not null constraint restrict from inserting null values. If we want some columns does not take null values then we can use this constraint. C)CHECK CONSTRAINT: A check constraint allows you to specify a condition on particular column in a table. we can add our custom logical conditions. CREATE TABLE TEST2 ( ID VARCHAR2(10) UNIQUE, NAME VARCHAR2(50), DEPT VARCHAR2(10) NOT NULL, AGE NUMBER(10), CHECK (AGE BETWEEN 18 and 60) ); #techquerypond https://techquerypond.wordpress.com https://techquerypond.com https://twitter.com/techquerypond
Views: 173 Tech Query Pond
Foreign Key | Database Management System
 
06:29
To ask your doubts on this topic and much more, click on this Direct Link: http://www.techtud.com/video-lecture/lecture-foreign-key IMPORTANT LINKS: 1) Official Website: http://www.techtud.com/ 2) Virtual GATE: http://virtualgate.in/login/index.php Both of the above mentioned platforms are COMPLETELY FREE, so feel free to Explore, Learn, Practice & Share! Our Social Media Links: Facebook Page: https://www.facebook.com/techtuduniversity Facebook Group: https://www.facebook.com/groups/virtualgate Google+ Page: https://plus.google.com/+techtud/posts Last but not the least, SUBSCRIBE our YouTube channel to stay updated about the regularly uploaded new videos.
Views: 245275 Techtud
Oracle||Oracle Integrity Constrants Patr -1 by Dinesh
 
32:48
DURGASOFT is INDIA's No.1 Software Training Center offers online training on various technologies like JAVA, .NET , ANDROID,HADOOP,TESTING TOOLS ,ADF,INFORMATICA,TABLEAU,IPHONE,OBIEE,ANJULAR JS, SAP... courses from Hyderabad & Bangalore -India with Real Time Experts. Mail us your requirements to [email protected] so that our Supporting Team will arrange Demo Sessions. Ph:Call +91-8885252627,+91-7207212428,+91-7207212427,+91-8096969696. http://durgasoft.com http://durgasoftonlinetraining.com https://www.facebook.com/durgasoftware http://durgajobs.com https://www.facebook.com/durgajobsinfo......
How to create Unique Constraint on Multiple Columns in SQL Server - SQL Server/TSQL Tutorial Part 96
 
07:57
SQL Server / TSQL Tutorial Scenario: If you have noticed the insert statement, In First Record I have put both Null values for FirstName and Last Name. In 2nd record I used the value 'Aamir' for first name and Null for Last Name. In 3rd record vice versa of 2nd record. From here what we understand that the unique constraint is working on both column values. As long as the combined value from both columns is unique, it is going to let us insert even one of them is null. Link to scripts used in SQL Server / TSQL Tutorial Video http://www.techbrothersit.com/2016/05/how-to-create-unique-constraint-on.html Check out our website for Different SQL Server, MSBI tutorials and interview questions such as SQL Server Reporting Services(SSRS) Tutorial SQL Server Integration Services(SSIS) Tutorial SQL Server DBA Tutorial SQL Server / TSQL Tutorial ( Beginner to Advance) http://www.techbrothersit.com/
Views: 2111 TechBrothersIT
SQL Server 28 - Composite Primary Key
 
04:55
The previous video had these tables: CREATE TABLE Species( ID INT PRIMARY KEY IDENTITY, Species VARCHAR(50) NOT NULL UNIQUE, FriendlyName VARCHAR(50) NOT NULL ); CREATE TABLE Animals( ID INT PRIMARY KEY IDENTITY, Name VARCHAR(50) NOT NULL, Species INT NOT NULL REFERENCES Species(ID), ContactEmail VARCHAR(50) NOT NULL UNIQUE ); These column attributes are all examples of constraints. To be more specific, they are known as column-level constraints. Sometimes you need to create what is known as a table-level constraint. To illustrate this, we are going to create a new table that shows this in action. Remember that we are trying to create an animal dating site. A specific animal can create an account on our website and say what kind of species he or she is interested in. One specific animal can be interested in multiple species and an individual species can be liked by many animals. Therefore, it is a many to many relationship. We already have a Species table and an Animals table, so we need an intermediary table to associate animals with species: CREATE TABLE Interests( AnimalID INT NOT NULL REFERENCES Animals(ID), SpeciesID INT NOT NULL REFERENCES Species(ID) ); But now, we want to create a composite primary key, the combination of both columns. A column-level attribute is not capable of doing this because it is associated with just one column. Let's create a table-level constraint. To do this we add the constraint as if it's another column: CREATE TABLE Interests( AnimalID INT NOT NULL REFERENCES Animals(ID), SpeciesID INT NOT NULL REFERENCES Species(ID), PRIMARY KEY (AnimalID, SpeciesID) ); The downside here is that we cannot create a foreign key to reference this composite key. If for some reason we have to be able to reference an individual interest in another table, we would create an ID column and put a UNIQUE constraint on the combination of AnimalID and SpeciesID. Then we could reference an individual ID. Now, in SSMS, inside of our tables key folder you can find the composite key. Unfortunately, SSMS defaults to a pretty ugly name for our primary key constraint. Fortunately, we can actually give names to our constraints. That's what we will be doing in the next video. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 7252 Caleb Curry
Oracle SQL Tuning with NOT NULL Constraints
 
02:28
Learn how to tune SQL with Constraints! In this lesson (3 of 5), OCM John Watson from SkillBuilders demonstrates how to improve query performance by adding not null constraints. See all lessons, free at http://www.skillbuilders.com/oracle-database-sql-tuning-with-constraints.
Views: 385 SkillBuilders
Oracle SQL Tutorial 14 - Column-Level and Table-Level Constraints
 
04:15
In the previous video we talked about adding constraints at the column-level. We made it nice and simple by only requiring a few keywords, but the problem we were having is that we could not assign a name to the constraint, which many people like to do so we can reference easily if we need to at a later time. To do this, it requires a little bit more typing, but it will give us extra flexibility and many consider it to be the higher quality approach to adding constraints. Let's go though a simple example. Let's say we have a users table with a user_id column that we want to make a primary key. We will create the table like this: CREATE TABLE( user_ id NUMBER PRIMARY KEY ) Instead of adding the PRIMARY KEY keywords after the data type, we add: CONSTRAINT user_pk PRIMARY KEY Now, we have assigned the name user_pk to this constraint. You can do the same with other constraints, such as UNIQUE. The syntax would be CONSTRAINT username_un UNIQUE. The other way to create constraints requires to put all of our constraints at the bottom of our table creation rather than inline with the column. This type of constraint is known as a table-level constraints. To make a column a primary key using table-level constraints, we add it to the CREATE TABLE command as if it is another row and use the CONSTRAINT keyword to tell Oracle that what is coming is a constraint, not a column in our table. CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR), CONSTRAINT username_un UNIQUE (username), CONSTRAINT users_pk PRIMARY KEY (user_id) ) The primary differences here is that you have to put the column you are talking about in parenthesis after the PRIMARY KEY keyword. That's because it's at the end of the table and you need a way to tell it what column you are talking about. The option of putting it at the end of the table has the added benefit in this situation because if we needed to have a primary key that is the combination of multiple columns, we can do that by just adding the other column in the PRIMARY KEY parenthesis right after a comma. In summary, there are three ways to make constraints. The first is at the column level, unnamed. The second is at the column level, named. The third is at the table level, also named. In the next video we are going to create a named constraint in Oracle SQL Developer, so stay tuned and be sure to subscribe! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 13264 Caleb Curry
UNIQUE AND NON-UNIQUE INDEX IN SQL (URDU / HINDI)
 
20:44
SUBSCRIBE FOR MORE AND PRESS BELL ICON TO GET LATEST VIDEO UPDATES...
Views: 218 Learning Never Ends
Oracle Constraints تعليم اوراكل
 
02:23
by Mohamed El Desouki - محمد الدسوقى [email protected] Tel :00966 553450836 جامعة سلمان بن عبد العزيز - السعودية - الخرج What Is Database constraint ? ماهى القيود التى يمكن تطبيقها على قواعد البيانات Text Book: Fundamentals of Database Systems, 5th Edition, by Elmasri/Navathe, published by Addison-W oracle create table statement oracle drop table statement oracle constraints database constraints primary key constraint foreign key constraint check constraint null not null constraint unique constraint
Tutorial 43 : INDEX in Oracle || BITMAP INDEX.
 
08:32
Hi Friends! Here we are learning about BITMAP Index. Help the concept is clear to you. Please give me your feedback in Comment Box. Thanks. Happy Coding.
Views: 104 YourSmartCode
Simplest way to create Tables on Oracle 12c
 
04:30
--EMPLOYEE TABLE CREATE TABLE "EMP" ( "EMPNO" NUMBER(4,0), "ENAME" VARCHAR2(10 BYTE), "JOB" VARCHAR2(9 BYTE), "MGR" NUMBER(4,0), "HIREDATE" DATE, "SAL" NUMBER(7,2), "COMM" NUMBER(7,2), "DEPTNO" NUMBER(2,0) ) SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ; REM INSERTING into EMP SET DEFINE OFF; Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (5258,'ALEX','MANAGER',null,to_date('25-JAN-89','DD-MON-RR'),1500,500,null); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7875,'Aziz','MANAGER',7839,to_date('17-NOV-97','DD-MON-RR'),5000,1000,10); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7899,'HADI','PRESIDENT',null,to_date('09-MAY-99','DD-MON-RR'),9000,null,10); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (3576,'ABDURAUF','MANAGER',null,null,null,null,null); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (3131,'EBAD','CR',null,to_date('25-JAN-81','DD-MON-RR'),1500,500,null); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7955,'JOHNABRAHM','QWERT',null,to_date('18-JUN-20','DD-MON-RR'),2000,null,30); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (5952,'JENN','MANAGER',null,to_date('25-JAN-81','DD-MON-RR'),1500,500,null); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7369,'SMITH','CLERK',7902,to_date('17-DEC-80','DD-MON-RR'),800,null,20); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7499,'ALLEN','SALESMAN',7698,to_date('20-FEB-81','DD-MON-RR'),1600,300,30); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7521,'WARD','SALESMAN',7698,to_date('22-FEB-81','DD-MON-RR'),1250,500,30); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7566,'JONES','MANAGER',7839,to_date('02-APR-81','DD-MON-RR'),2975,null,20); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7654,'MARTIN','SALESMAN',7698,to_date('28-SEP-81','DD-MON-RR'),1250,1400,30); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7698,'BLAKE','MANAGER',7839,to_date('01-MAY-81','DD-MON-RR'),2850,null,30); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7782,'CLARK','MANAGER',7839,to_date('09-JUN-81','DD-MON-RR'),2450,null,10); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7788,'','ANALYST',7566,to_date('19-APR-87','DD-MON-RR'),3000,null,20); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7839,'KING','PRESIDENT',null,to_date('17-NOV-81','DD-MON-RR'),5000,null,10); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7844,'TURNER','SALESMAN',7698,to_date('08-SEP-81','DD-MON-RR'),1500,0,30); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7876,'ADAMS','CLERK',7788,to_date('23-MAY-87','DD-MON-RR'),1100,null,20); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7900,'JAMES','CLERK',7698,to_date('03-DEC-81','DD-MON-RR'),950,null,30); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7902,'FORD','ANALYST',7566,to_date('03-DEC-81','DD-MON-RR'),3000,null,20); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7934,'MILLER','CLERK',7782,to_date('23-JAN-82','DD-MON-RR'),1300,null,10); Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (5230,'SCARLET','MANAGER',null,to_date('26-JAN-81','DD-MON-RR'),1600,600,null); CREATE UNIQUE INDEX "PK_EMP" ON "EMP" ("EMPNO") PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ; ALTER TABLE "EMP" ADD CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ENABLE; ALTER TABLE "EMP" ADD CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO") REFERENCES "DEPT" ("DEPTNO") ENABLE;
Views: 51 Fareed Ullah
Advantages and disadvantages of indexes in sql server   Part 38
 
12:20
In this video we will learn about 1. Advantages and disadvantages of indexes 2. The types of queries that can benefit from indexes 3. Covering Queries Text version of the video http://csharp-video-tutorials.blogspot.com/2012/09/advantages-and-disadvantages-of-indexes.html Slides http://csharp-video-tutorials.blogspot.com/2013/09/part-38-adv-dis-adv-of-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: 153696 kudvenkat
ADD CONSTRAINTS to a new table
 
21:45
This video explains what are primary key,not null,unique,default,check constraints and how to add constraints to the columns in a table while the creation of a new table. link to HOW to add constraint while creating table: https:// https://www.youtube.com/watch?v=dh_UKs-LnK8 link to how to add new columns with constraints : https://www.youtube.com/watch?v=UNAatxnnwB8 link to how to add constraints to existing column https://www.youtube.com/watch?v=02_fXRQpwSc how to drop all constraints on the table: https://www.youtube.com/watch?v=CM7FPqIr6gc subscribe - https://www.youtube.com/channel/UCNl7...
Views: 568 kwl zerotwonine
Oracle SQL Tuning with Unique Constraints
 
02:28
Learn how to tune SQL with Constraints! In this lesson (4 of 5), OCM John Watson from SkillBuilders demonstrates how to improve query performance by adding not null constraints. See all lessons, free at http://www.skillbuilders.com/oracle-database-sql-tuning-with-constraints.
Views: 285 SkillBuilders
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
Views: 8569 Tech Query Pond
Types of Constraints in SQL Server
 
12:41
Video talks about types of constarints in sql server sql constraints unique constraint in sql primary key constraint in sql not null constraint in sql foreign key constraint in sql default constraint in sql check constraint in sql importance of constraints in sql Step by step SQL Training videos SQL Tutorial More videos at https://www.youtube.com/channel/UCgWvQ6cBxZwABl_hL48ayXg
Views: 561 Training2SQL MSBI
Creating a Unique Constraint in Microsoft SQL Server Management Studio
 
05:42
Here is a quick tutorial on Creating a Unique Constraint in Microsoft SQL Server Management Studio using the Microsoft AdventureWorks database.
Views: 10930 Roland Martin

Cover letter for demotion
Business writing service
How to write a cover letter for a resume samples
Custom papers writing service
Web content writing service