Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving #12

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/SQL.BuildAndDestroy.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/dataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions answers/exercise1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE DATABASE myNewDB;





2 changes: 2 additions & 0 deletions answers/exercise2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

show databases;
15 changes: 15 additions & 0 deletions answers/exercise3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
show databases;
CREATE DATABASE myNewDB;

USE myNewDB;
DROP TABLE Users;

CREATE TABLE Users(
UserID INT,
LastName VARCHAR(255),
FirstName VARCHAR(255),
Address VARCHAR(255),
City VARCHAR(255)
);

SELECT * FROM users;
6 changes: 6 additions & 0 deletions answers/exercise4.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
show databases;

DROP TABLE Users;
SHOW TABLES;


17 changes: 17 additions & 0 deletions answers/exercise5.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
SHOW DATABASES;
use myNewDB;

CREATE TABLE Users(
UserID INT,
LastName VARCHAR(255),
FirstName VARCHAR(255),
Address VARCHAR(255),
City VARCHAR(255),
Birthday DATE
);

INSERT INTO Users (UserID)
VALUES(255);
TRUNCATE TABLE Users;

SELECT * FROM Users;
7 changes: 7 additions & 0 deletions answers/exercise6.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SHOW DATABASES;
use myNewDB;

ALTER TABLE Users
DROP COLUMN Birthday;

SELECT * FROM Users;
7 changes: 7 additions & 0 deletions answers/exercise7.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SHOW DATABASES;
use myNewDB;

ALTER TABLE Users
DROP COLUMN Birthday;

SELECT * FROM Users;
2 changes: 2 additions & 0 deletions import/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions import/.idea/import.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions import/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions import/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.