Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Database Management System: Altering Tables and Data Manipulation, Slides of Introduction to Database Management Systems

An overview of the alter table statement in database management systems, which allows users to modify the definition of existing tables. Topics covered include adding and dropping attributes or constraints, as well as examples using the docsity.com platform. Additionally, the document discusses the data manipulation language (dml) and the insert statement for adding records to tables.

Typology: Slides

2011/2012

Uploaded on 11/03/2012

dharmaraaj
dharmaraaj 🇮🇳

4.4

(65)

153 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Database
Management
System
Lecture - 27
Docsity.com
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Database Management System: Altering Tables and Data Manipulation and more Slides Introduction to Database Management Systems in PDF only on Docsity!

Database

Management

System

Lecture - 27

Alter Table Statement

Purpose is to make changes in the

definition of a table already created

through Create statement

Can add, drop attributes or

constraints, activate or deactivate

constraints; the format is

ALTER TABLE Student

add constraint fk_st_pr

foreign key (prName) references

Program (prName)

ALTER TABLE program

add constraint ck_totSem

check (totSem < 9)

Alter Table Command

Removing or Changing Attribute

ALTER TABLE student

ALTER COLUMN stFName char(20)

Alter table student

drop column curSem

Alter table student

drop constraint ck_st_pr

Data Manipulation Language

Insert

Select

Update

Insert Statement

 To insert records into tables
 INSERT [ INTO] table
{ [ ( column_list ) ]
{ VALUES
( { DEFAULT | NULL | expression } [ , ... n ] )
| DEFAULT VALUES