SQL tutorials 17: SQL Primary Key constraint, Drop primary Key

preview_player
Показать описание

SQL tutorial on Primary key / SQL Primary key,
In this tutorial you will learn about
simple primary key, composute primary key, how to drop primary key. defining primary key using create table and alter table along with many other things.

Tool used in this tutorial is SQL Developer.
This tutorial series is part of SQL expert exam certification training. if you are preparing for SQL certification you can use my tutorials. This SQL Tutorial is a part of free training.

Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage

Contacts
E-Mail
Twitter
Instagram
Facebook.
Linkedin.

Thanks for linking, commenting, sharing and watching more of our videos

So Primary Key
There are two types of Primary keys
First is Simple primary Key: Primary key which Involves only one column and
Second is Composite Primary Key: Primary Key which involves more than one column.
We will start with Simple primary key.
You can create Primary key either with Create Table statement of by using Alter table Statement.
Let's define simple primary key using create table statements.
With create table statement we can either define primary key at column level or at table level.
We will start with defining Primary key at column level using create table statement.
You just have to put keyword Primary key after data type and size of column while defining a column of a table. Here oracle server will create a primary key on product id with default constraint name which will be slightly difficult to understand. You can give your own name to your constraint which is also a good practice.
Рекомендации по теме
Комментарии
Автор

thanks to this video, my semester will be saved

johncharleshalili
Автор

excellent job Manish .... this video is great and help me lot ....

i really appreciate your work .... and thanks for this video ....

thank you very much

Ajay Kumar

GamingStrike
Автор

i really like u r way of teaching, it is concise

vamshisamineniz
Автор

thanks manish, these all videos really help me work !!

sagarmane
Автор

this is the BESTTT video. keep it up you're doing an amazing job :D

tehreemakhtar
Автор

Thanks for the tutorial; Very confident delivery

LukusCannon
Автор

Thanks Manish for these videos which is helping more & more.
I need your help on how to use newID() function in Oracle.

sanhitgaming
Автор

Could you please upload remaining constrains also check, defalut, unique

jhansibode
Автор

One of the best tutorial class with all the details...Keep Going...
Some Queries:
1.I created a table, and I want to add Primary Key to a table 'Name'.but the name column have null and duplicate values, What should I do?? Can I add it if not what should I do, I dont want any other column as PK but name has the above issues.
2.Can You make a video on various level Certification on Oracle in detail...

kevintech
Автор

great tutorial... Thanks for the effort

TufteeArt
Автор

Manish you are great!!!
I appreciate your tutorials

jdr.paradigmabiblico
Автор

Hi manish thanks for the video.
Can you please answer a question why do we have a need to enable and disable the primary key.?

shahbaz_games
Автор

best of luck for oracle 12c video i hope it will be awesome

akshayrokade
Автор

Sir Can you help me with one problem?
I want to connect a MADE java Application GUI(in Netbeans) with Oracle database 11g (But with Primary Key Constraint, i cannot use Primary key in Oracle Database)
Can you give me any documentation and advice for an Java Application? And Thanks for your hard work on youtube ! Keep it Up

gabrielalbu
Автор

Hello Manish,

First of all I am a hug fan. It is incredible the way you simplify things.
While going through this tutorial I didn't understand the concept of Composite Key.
Because referring to the example you have shown here. I am still having duplicate values for phone number but unique values for customer id.

please help...

BasitBhat
Автор

Hy can you please make tutorials about oracle jdeveloper and adf please and how to use oracle database within a project like restapis and tnx for your wirk keep going

michelchaghoury
Автор

Helo sir, can i add primary key to multiple columns without dropping existing primary key?

Charu
Автор

Boss simply superb all of this SQL videos...I loved it and instantly subscribed your channel. :)
could you provide me real time scenarios..It would  helps a lot

rajeshbajjuri
Автор

Question: Why must we drop the simple constraint PK before altering the table to add the composite.  In your example, when creating the table the composite constraint was in the DDL?

chrisgilchrist
Автор

best in youtube even there are subtitles

berkcan
join shbcf.ru