PostgreSQL_Objective_Questions_for_Data_Analysts
PostgreSQL_Objective_Questions_for_Data_Analysts
A) INSERT
B) UPDATE
C) SELECT
D) DELETE
2. In PostgreSQL, which data type would be most appropriate to store large amounts of text?
A) VARCHAR
B) INTEGER
C) BOOLEAN
D) TEXT
3. What command is used to remove all records from a table without deleting the table itself?
A) DROP
B) DELETE
C) TRUNCATE
D) REMOVE
A) UNIQUE
B) PRIMARY KEY
C) FOREIGN KEY
D) DUPLICATE
7. Which of the following joins will return all rows when there is a match in either left or right table?
A) INNER JOIN
B) LEFT JOIN
C) RIGHT JOIN
D) FULL OUTER JOIN
8. Which of the following data types is used to store monetary values in PostgreSQL?
A) MONEY
B) DECIMAL
C) FLOAT
D) INTEGER
A) MAKE TABLE
B) NEW TABLE
C) CREATE TABLE
D) INSERT TABLE
A) MATCH
B) LIKE
C) PATTERN
D) EQUAL
A) PRIMARY_KEY
B) PK()
C) PRIMARY KEY
D) KEY PRIMARY
13. In PostgreSQL, which of the following would allow for automatic sequencing of numbers in a column?
A) SERIAL
B) INTEGER
C) AUTO_INCREMENT
D) INCREMENT
14. Which of the following aggregate functions would you use to find the average of values in a column?
A) TOTAL
B) SUM
C) AVG
D) COUNT
15. What is the result of the following query: SELECT DISTINCT column_name FROM table_name;?
A) It selects only rows where column_name is unique
B) It returns all rows in table_name
C) It removes duplicate values in column_name
D) It renames column_name
A) UNIQUE
B) DISTINCT
C) DISTINCTROW
D) REMOVE
17. Which of the following commands would you use to update existing data in a table?
A) MODIFY
B) CHANGE
C) UPDATE
D) INSERT
18. What does the following SQL command do: DELETE FROM employees WHERE id = 10?
A) OR
B) AND
C) EITHER
D) IF