Fighter+&+Weapons+SQL+Assignment


 * 1) Run each CREATE TABLE statement
 * 2) Run each INSERT statement below (that's 2 weapons)
 * 3) Create your own INSERT statements to add 2 more rows to the weapons table
 * 4) Create your own INSERT statements to add 4 rows to the fighters table
 * 5) Run the SELECT statement then call me over

code format="sql" CREATE TABLE weapons (weapon_name	VARCHAR2(20) PRIMARY KEY, damage 			NUMBER NOT NULL, range 			NUMBER, damage_type 	VARCHAR2(10) NOT NULL)

CREATE TABLE fighters (name			VARCHAR2(20) PRIMARY KEY, strength		NUMBER NOT NULL, speed			NUMBER NOT NULL, health			NUMBER NOT NULL, weapon_name		VARCHAR2(20) REFERENCES weapons(weapon_name))

INSERT INTO weapons VALUES ('dagger', 4, NULL, 'piercing')

INSERT INTO weapons VALUES ('crossbow', 8, 100, 'piercing')

SELECT * FROM weapons w FULL OUTER JOIN fighters f ON (w.weapon_name = f.weapon_name) code