Search Header Logo

COS326 L7 2025

Authored by Sheunesu Makura

Computers

University

Used 1+ times

COS326 L7 2025
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid array declaration in PostgreSQL?

  1. text[] schedule[][]

  1. schedule text[][]

  1. ARRAY(text[][])

schedule = text[][]

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which PostgreSQL function returns the dimensions of an array?

array_length()

array_dims()

array_size()

array_dimensions()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following query return?

SELECT name FROM sal_Emp WHERE payByQuarter[1] <> payByQuarter[2];

Names of employees with equal first two quarterly payments

Names of employees with different first two quarterly payments

Names of employees with missing payments

Names of employees with NULL values

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to insert a 2D array in PostgreSQL?

ARRAY[ ['a', 'b'], ['c', 'd'] ]

ARRAY( ('a', 'b'), ('c', 'd') )

ARRAY{ {'a', 'b'}, {'c', 'd'} }

ARRAY['a', 'b', 'c', 'd']

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

The query

SELECT array_dims(schedule) FROM sal_Emp WHERE name = 'Thando';

returns the _______ of the schedule array.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?