ALTER COMMAND IN SQL || DDL COMMANDS || SQL COMMANDS || ALTER DATABASE || MYSQL || DBMS

preview_player
Показать описание
ALTER COMMAND IN SQL

- DDL COMMAND

- To change the shcema / Structure of database

* Add Column
* Delete Column
* Modify datatype of existing column
* Set constraints like NOT NULL, PRIMARY KEY, UNIQUE KEY etc..
* Remove constraints
-----------------------------------------------------------------------------------

ADD COLUMN

alter table table_name
add column_name datatype

DROP COLUMN

alter table table_name
drop column column_name

MODIFY DATATYPE

alter table table_name
modify column column_name datatype

ADD NOT NULL

alter table table_name
modify column_name datatype NOT NULL

ADD CONSTRAINT UNIQUE

alter table table_name
add constraint unique(column_name)

ADD PRIMARY KEY CONSTRAINT

alter table table_name
add constraint primary key(column_name)

ADD CONSTRAINT CHECK

alter table table_name
add constraint check(condition)

DROP CONSTRAINT PRIMARY KEY

alter table table_name
drop primary key

DROP CONSTRAINT UNIQUE

alter table table_name
drop index column_name

----------------------------------------------------------------------------------------------------
HOW TO DOWNLOAD & INSTALL MySQL IN WINDOWS 10

DATABASE MANAGEMENT SYSTEM

PYTHON PROGRAMS

C PROGRAMMING

CORE JAVA TUTORIAL FOR BEGINNERS || LEARN CORE JAVA IN 15 HOURS || JAVA TUTORIALS FOR BEGINNERS

HTML TUTORIALS WITH IMPLEMENTATION || LEARN HTML IN 4 HOURS

LEARN CSS IN 3 HOURS || CASCADING STYLE SHEETS FOR BEGINNERS

JAVA SCRIPT FOR BEGINNERS IN 7 HOURS || LEARN JAVA SCRIPT IN 7 HOURS || JAVA SCRIPT

PYTHON TUTORIALS FOR BEGINNERS (తెలుగు లో)

PYTHON OOPS - MODULES - EXCEPTION HANDLING (తెలుగు లో)

PYTHON NUMPY TUTORIAL IN TELUGU (తెలుగు లో) || COMPLETE NUMPY TUTORIALS IN TELUGU

PYTHON PANDAS TUTORIAL IN TELUGU (తెలుగు లో) || COMPLETE PANDAS TUTORIALS IN TELUGU || DATA SCIENCE

MATPLOTLIB LIBRARY - PYTHON PROGRAMMING (ENGLISH)

PYTHON DATABASE CONNECTIVITY - MYSQL & MS-EXCEL

DATA STRUCTURES USING PYTHON (ENGLISH)

----------------------------------------------------------------------------------------------
Рекомендации по теме
Комментарии
Автор

Sir, You really explain well in a simple manner. I refer your videos even for the Python Programs and learnt a lot.

jeevithaloknath
Автор

Hey my friend, blessed to discover your channel.
I have only a simple enquiry as a newbie sql learner.
What is the main difference between alter and update in terms of their application in sql?
Thanks for taking time on this..

hasanmougharbel
Автор

Hi sir, your explanation is good. While I am using not null constraint iam getting error invalid use of null value. Can you please suggest me.

chevalasudharani
Автор

Sir please explain select(DQL) with all the conditions and clauses

sukumarkothapally
Автор

Hello Sir,

Can we update a column name in a table on top of data type instead of removing and adding it again ? For example, I have column name as "EmployID" hence I want to change it "Employee_ID".

Mahboob_Creative_Arts
Автор

how to delete check and default constraints?

hemandh