- Creating simple college database using SQL.
- GitHub : Code
Here is a code snippet:
INSERT INTO student_tbl(ID, first_name, last_name, home_address, college_address, contact_number, department)
VALUES
(1, "John", "Murphy", "111 Park Street", "Stafford Building", "7654567632", "science"),
(2, "Sandra", "Hauge", "256 Stafford Street", "Stafford Building", "7634567652", "science"),
(3, "Jerry", "Millar", "222 Green Gardens", "Stafford Building", "7623951287", "science"),
(4, "Heather", "Dawson", "255 Lincoln Street", "Grand Building", "7629845645", "enginerring"),
(5, "Ryan", "Egan", "300 Grand Avenue", "Grand Building", "7649237645", "enginerring");
ALTER TABLE student_tbl
ADD PRIMARY KEY (ID);
UPDATE student_tbl
SET home_address = "234 Park Avenue", contact_number = "2345556767"
WHERE ID = 3;
UPDATE student_tbl
SET department = "engineering"
WHERE college_address = "Grand Building";
DELETE FROM student_tbl
WHERE ID = 3;
- w3schools - This helped me for using SQL syntax.
- w3school - This helped me for adding primary key to a database.
- Website - Marvin Morales Pacis
- LinkedIn - @marvedventures
- Twitter - @marvedventures