Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

PostgreSQL Exam PGCES-02 Topic 8 Question 30 Discussion

Actual exam question for PostgreSQL's PGCES-02 exam
Question #: 30
Topic #: 8
[All PGCES-02 Questions]

The tables "s1" and "s2" are defined below. The column "id" for tables "s1" and "s2" is of INTEGER type. The column "enable" for table "s1" is of BOOLEAN type, and the column "name" for table "s2" is of TEXT type.

s1: id |

enable

----+--------

1 | t 2 | f

s2: id |

name ----

+------ 1 |

post 2 |

gre 3 |

SQL

The following SQL was executed. Select the correct number of rows in the result. SELECT * FROM s2 WHERE id IN (SELECT id FROM s1);

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Virgilio
17 days ago
The key to this question is understanding the relationship between the two tables. Since the 'id' column in both tables is of INTEGER type, we can use the IN clause to find the matching ids. Given the data in the tables, there are 2 rows in 's1' table, and 3 rows in 's2' table that have matching ids. Therefore, the correct answer is B) 2 rows.
upvoted 0 times
Salena
4 days ago
I think the answer is B) 2 rows.
upvoted 0 times
...
...
Vicente
20 days ago
I'm not sure, but I think the answer might be C) 3 rows.
upvoted 0 times
...
Evette
22 days ago
I agree with Nancey, because there are 2 matching ids in s1 and s2.
upvoted 0 times
...
Nancey
27 days ago
I think the answer is B) 2 rows.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77