I just need the SQL statements for these problems. 1.)Make the distance for the
ID: 3826857 • Letter: I
Question
I just need the SQL statements for these problems.
1.)Make the distance for the Pontook Reservoir Tour trip equal to an unknown number.
2.)Add to the PADDLING table a new character column named DIFFICULTY_LEVEL that is three characters in length. Then set the default difficulty level value for all rows to the value MOD.
3.)Change the DIFFICULTY_LEVEL column in the PADDLING table to HRD for the Lake Champlain Tour trip.
4.)Change the DIFFICULTY_LEVEL column in the PADDLING table to reject nulls.
PADDLING Column Type Length Decimal Places Nulls Allowed? Description DECIMAL 3 TRIP ID Trip ID (primary key) 75 TRIP NAME CHAR Trip name 2 STATE CHAR Trip state DISTANCE DECIMAL 4 Trip distance MAX GRP SIZE DECIMAL 4 0 Maximum number of people on trip 20 Season in which trip takes place SEASON CHARExplanation / Answer
1)UPDATE table paddling SET distance='unknown' WHERE trip_name='Pontook Reservoir Tour trip';
2) ALTER table paddling add column difficulty_level char(3);
3)UPDATE TABLE paddling SET difficulty_level= 'HRD' WHERE trip_name= 'Lake Champlain Tour';
4)First, make all current NULL values disappear:
UPDATE PADDLING SET difficulty_level=0 WHERE difficulty_level IS NULL
ALTER TABLE paddling ALTER COLUMN difficulty_level INTEGER NOT NULL