Last active
December 13, 2018 14:52
-
-
Save StPeteFrank/054bbe7a017e39c8464c7e575f0dc602 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
createdb CompanyDatabase | |
pgcli CompanyDatabase | |
CREATE TABLE Employees (Id INT, FullName TEXT, Salary INT, Department TEXT, PhoneExtension INT, IsPartTime BOOLEAN); | |
SELECT * FROM employees | |
SELECT fullname, phoneextension FROM employees WHERE isparttime = false; | |
INSERT INTO employees (id, fullname, salary, department, phoneextension, isparttime) VALUES (8, 'Gorgeous George', 450, 'software developer', 108, true); | |
UPDATE employees SET salary=500 WHERE department = 'cook'; | |
DELETE FROM employees WHERE fullname = 'Lazy Lynn'; | |
UPDATE employees SET isparttime=false; | |
ALTER TABLE employees ADD ParkingSpotNumber VARCHAR(10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment