Font size
WorksheetsPostgreSQL Refresher
Total questions: 13
Worksheet time: 13mins
Which of the listed items can not be used for interacting with PostgreSQL?
DBeaver
pgAdmin
Psql
Google Data Studio
Which options are not correctly describing the following Psql commands?
\q
exit the Psql
\l
list available tables
\g
execute previous command
\x
make display experience better
Which SQL statement we can use to create a namespace?
CREATE DATABASE
CREATE SCHEMA
CREATE TABLE
CREATE NAMESPACE
Which SQL statement we can use to change an existing value of a field
UPDATE
SELECT
DELETE
COUNT
Which of the following is not a valid SQL type?
FLOAT
NUMERIC
REAL PRECISION
CHARACTER
Which one of the following items is a valid SQL constraint?
Primary-key
Foreign-key
Not null
Check
Which statement is used to delete all rows in a table without having the action logged?
TRUNCATE
DELETE
REMOVE
DROP
What operator tests columns for absence of data?
NOT
EXISTS
IS NULL
None of above
_________ command makes the updates performed by the transaction permanent in the database?
ROLLBACK
COMMIT
TRUNCATE
DELETE
Which one will update the "Thomas" last names to "Michel" in the Users table?
UPDATE User SET LastName = 'Thomas' INTO LastName = 'Michel'
MODIFY Users SET LastName = 'Michel' WHERE LastName = 'Thomas'
MODIFY Users SET LastName = 'Thomas' INTO LastName = 'Michel'
UPDATE Users SET LastName = 'Michel' WHERE LastName = 'Thomas'
Which option will delete all the cities called CyberJaya from City table in Sales schema?
DELETE FROM city where name=’'CyberJaya'
DELETE FROM sales.city where true
DELETE FROM sales.city where name=’'CyberJaya'
DELETE FROM city where name is CyberJaya
Which option describes LEFT JOIN better?
Rows that have matches from both side
All from the left, matches from the right
All from the right, matches from the left
All rows that have match in either side
Please select the Incorrect statement about CTEs?
CTE makes code maintainability easier
the WITH clause declares virtual tables which exist only for the duration of the statement
Not everything that can be done with normal, non-recursive CTE can be done with sub-queries
CTE improves the code readability
