A set of tables are defined as follows: t1 t2 How many rows are returned by executing the following SQL statement? SELECT * FROM t1 WHERE EXISTS (SELECT name FROM t2 WHERE t1.id = t2.id);
Correct : B
Start a Discussions
SQL statements were executed in the following order. CREATE TABLE book ( id VARCHAR(21), title TEXT NOT NULL, price INT, UNIQUE
(id), CHECK (price > 0) ); INSERT INTO book VALUES ('4-12345-678-
9', 'SQL book', 2300); --(1) INSERT INTO book (title, price) VALUES
('PostgreSQL', 3000); --(2) UPDATE book SET id = '4-12345-678-9'
WHERE id IS NULL; --(3) DELETE FROM book WHERE price < 0; --(4)
While executing, select the first location that generates an error.
Correct : C
Start a Discussions
Select one incorrect statement concerning the following SQL statement.
CREATE OR REPLACE VIEW sales_view AS SELECT * FROM sales_table ORDER BY sales_date DESC LIMIT 10;
Correct : D
Start a Discussions
A set of tables are defined as follows: t1 t2 How many rows are returned by executing the following SQL statement? SELECT * FROM t1 LEFT OUTER JOIN t2 USING (id);
Correct : C
Start a Discussions
Select two correct statements from below concerning the ANALYZE command.
Correct : A, D
Start a Discussions