B
B
bufon1122018-05-30 15:44:37
MySQL
bufon112, 2018-05-30 15:44:37

Will the sql query work?

There are 2 tables:
result:
competition_id (competition ID);
sportsman_id (athlete ID);
result (athlete result);
city ​​(venue);
hold_date (hold date);
sportsman
sportsman_id (sportsman ID);
sportsman_name (athlete name);
rank (athlete's rank);
year_of_birth (year of birth);
personal_record (personal record);
country (country of the athlete);
Required - Delete all the results of the Milan competition, the participants of which were born after 1980.
Will my query be correct? - UPDATE sportsman s INNER JOIN result r ON s.sportsman_id=r.sportsman_id SET result =' ' WHERE city= 'Milan' AND year_of_birth < 1980;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2018-05-30
@Rsa97

Will not.
Delete - the query should be DELETE, not UPDATE.
Not later - the year of birth is less than or equal to 1980.
Well, the general logic of the request is not entirely clear from the task. Several athletes take part in the competition. Do they all have to be born at least 1980 or any of them?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question