Information Technology Reference
In-Depth Information
The database modification statements of SQL are as follows:
• Insertion
The syntax of Insert statement of SQL is:
Insert into R
attributes (A 1 , A 2… A n )
values (V 1 , V 2 ,….V n )
For example, insert a student with student# = 1234 and student name = “John Doe”.
Insert into Student
attributes (Student#, Student_name)
values (1234, “John Doe”)
• Updating
The syntax of the update statement of SQL is:
Update R
Set A i = V i
[where P]
For example, modify the grade of all students enrolled into CS101 to 'B'.
Update Enrolled_Student
Set Grade = 'B'
where class# = 'CS101'
• Delete
The syntax of delete statement of SQL is:
Delete R
[where P]
For example, delete the grade of student whose student# is 1234 and who is taking
CS101.
Delete Enrolled_student
where Student# = 1234 and Class# = 'CS101'
Search WWH ::




Custom Search