Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
comp1204-cw2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
st6g19
comp1204-cw2
Commits
c392684a
Commit
c392684a
authored
2 years ago
by
st6g19
Browse files
Options
Downloads
Patches
Plain Diff
bash file to create database and tables
parent
8e88ce02
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
create_DB.sh
+5
-2
5 additions, 2 deletions
create_DB.sh
with
5 additions
and
2 deletions
create_DB.sh
+
5
−
2
View file @
c392684a
#!/bin/bash
#!/bin/bash
$(
/opt/lampp/bin/mysql
-u
root
-e
"create database furniture_price; use furniture_price"
)
#$(/opt/lampp/bin/mysql -u root -e "create database furniture_price; use furniture_price")
$(
/opt/lampp/bin/mysql
-u
root
-e
"use furniture_price; create table bed_price(id int, bed_type varchar(50), bed_price float, get_date timestamp)"
)
#$(/opt/lampp/bin/mysql -u root -e "use furniture_price; create table bed_data(id int NOT NULL AUTO_INCREMENT, bed_name varchar(50), bed_price float, get_date timestamp, PRIMARY KEY (id))")
#$(/opt/lampp/bin/mysql -u root -e "use furniture_price; create table sideTable_data(id int NOT NULL AUTO_INCREMENT, sideTable_name varchar(50), sideTable_price float, get_date timestamp, PRIMARY KEY (id))")
#$(/opt/lampp/bin/mysql -u root -e "use furniture_price; create table drawer_data(id int NOT NULL AUTO_INCREMENT, drawer_name varchar(50), drawer_price float, get_date timestamp, PRIMARY KEY (id))")
$(
/opt/lampp/bin/mysql
-u
root
-e
"use furniture_price; create table wardrobe_data(id int NOT NULL AUTO_INCREMENT, wardrobe_name varchar(50), wardrobe_price float, get_date timestamp, PRIMARY KEY (id))"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment