Skip to content
Snippets Groups Projects
ScheduleApp.sql 839 B
Newer Older
  • Learn to ignore specific revisions
  • 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)
        );
        
    create table Shifts(
    	shift_day int,
        start_time int,
        end_time int
    );
    
    select * from Employees;
    
    INSERT INTO Employees (first_name,last_name) VALUES ('Rafi', 'Zereselasie');
    
    #create database assignment;
    #USE assignment;
    #create table posts
    #(
    #    tp			varchar(100) NOT NULL,
    #    dt			varchar(100) NOT NULL,
    #    ts			timestamp default current_timestamp on update current_timestamp
    #);
    #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;