Gpa 40 insert into students sid login name gpa age

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Students S WHERE S.gpa = 4.0; INSERT INTO Students (sid, login, name, gpa, age) sid, gpa, VALUES (53688, ‘smith@ee’, ‘Smith’, 3.2, 18); smith@ee’ Smith’ INSERT INTO Students VALUES (53688, ‘Smith’, ‘smith@ee’, 18, 3.2); Smith’ smith@ee’ Database Management Systems, 3rd ed., Ramakrishnan and Gehrke, Chapter 3 51 52 Delete Tuples Update Tuples To delete all the tuples for students named Smith: DELETE WHERE To modify column values of existing rows in a table: FROM Students S S.name = ‘Smith’; Smith’ UPDATE SET WHERE 53 Students S S.age = S.age + 1, S.gpa = S.gpa - 1 S.sid = 53688; 54 Loading Data Loading Data (continued) You can insert tuples into existing table from a text file. E.g., create text file called ‘mystudents.txt’ with 1 tuple per line and with mystudents.txt’ column values separated by tabs: 53688 <tab> Smith <tab> smith@ee <tab> 18 <tab> 3.2 54998 <tab> Jones <tab> jones@se <tab> 20 <tab> 2.9 67301 <tab> Verner <tab> vern@cs <tab> \N &...
View Full Document

Ask a homework question - tutors are online