Newer
Older
create database ScheduleApp;
use ScheduleApp;
create table Employees(
employee_ID INT NOT NULL auto_increment,
first_name varchar(25),
last_name varchar(25),
primary key (employee_ID)
);
shift_id INT NOT NULL auto_increment UNIQUE,
full_date DATE,
start_time INT,
end_time INT,
employee_ID INT,
PRIMARY KEY (shift_id),
FOREIGN KEY (employee_ID) REFERENCES Employees(employee_ID)
INSERT INTO Employees (first_name,last_name) VALUES ('Rafi', 'Zereselasie');
update employees set last_name='fasdfa' where employee_ID=9
update shifts set full_date="2022-03-12",start_time=900,end_time=1700 where shift_id=1
drop table Employees;
INSERT INTO Employees (first_name,last_name) VALUES ('Rafi', 'Zereselasie');
DELETE FROM shifts WHERE (shift_id = 3)
DELETE FROM employees WHERE (employee_id = 3)
#INSERT INTO posts (tp,dt) VALUES ('CMPT353', 'NOV 5');
#select * from posts order by tp desc;
#show tables;
#drop table posts;
#
-- alter user 'root'@'localhost' identified with mysql_native_password by 'password';
-- flush privileges;