Computer Science, asked by nikitha629341, 1 day ago


In SQL, consider the following two tables named Sailors and Reserves. You want to determine the sid of the sailors who have a rating of 10 or have
a reserve boat (bld) equal to 104. Which of these queries can be used to perform this task?
Table: Sailors
sid
sname
rating
age
23
Ben
7
58
58
Alice
10
45
45
Bob
8
26
Table: Reserves
sid
bid
23
102
day
10/10/2018
7/10/2018
58
104
60
115
5/5/2018

Answers

Answered by radhikamangal2020
0
What is this this is a doubt asking platform
Answered by ZareenaTabassum
0

Select sid

from Sailors,Reserves

where rating>10 or bId=104

1)In the first line we are selecting only sid attribute.

2)In the second line by combining two tables Sailors and Reserves using Natural Join .

3)In the third line we are specifying condition using WHERE keyword in that the condition is that rating should be greater than 10 or bId should be equal to 104

4)The output we get is 58

Similar questions