Table Emp(id, dept, salary) has rows (1,’HR’,3000), (2,’IT’,5000), (3,’IT’,4000), (4,’Ops’,2000). SELECT dept FROM Emp GROUP BY dept HAVING MAX(salary) – MIN(salary) > 0; What is returned?
Correct answer D. IT
Subject / 421 questions
Page 9 of Programming multiple-choice questions with answers. Tap an option to check yourself.
Page 9 of 22
Correct answer D. IT
Correct answer D. Physical data independence
Correct answer B. External level
Correct answer A. Data redundancy and inconsistency
Correct answer D. Granting users authorisation to access data
Correct answer A. Hierarchical model
Correct answer C. Derived attribute
Correct answer C. Multivalued attribute
Correct answer A. Discriminator (partial key)
Correct answer B. Total participation
Correct answer C. One-to-many
Correct answer B. The combination (student_id, course_id)
Correct answer C. A minimal superkey, with no proper subset that is also a superkey
Correct answer D. Always, whether or not an exception occurred in the try block
Correct answer C. 'a'
Correct answer C. FileExistsError is raised
Correct answer D. The contents are erased because the file is truncated
Correct answer A. The file is closed automatically when the block ends, even if an exception occurs
Correct answer D. __enter__ and __exit__
Correct answer B. The instance on which the method was called