Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. (TCO 3) What constraint can only be applied at table level or with an ALTER s

ID: 3823344 • Letter: 2

Question

2. (TCO 3) What constraint can only be applied at table level or with an ALTER statement? (Points : 4)        Foreign key
       Not null
       Single field primary key
       Composite primary key

       You must use curly braces, not parentheses.
       The comma after NOT NULL must be removed.
       The keywords cannot be in uppercase.
       Nothing is wrong.

7. (TCO 7) A left join returns _____. (Points : 4)        rows in the left table that don’t satisfy the join condition
       unmatched rows from both the left and right tables
       rows in the right table that don’t satisfy the join condition
       the Cartesian product of the two tables

       It will fail because the GROUP BY clause is not allowed in a view.
       It will fail because SUM function is not allowed in a view.
       It will fail because ORDER BY clause is not allowed in a view.
       It will succeed.

Question 3. 3. (TCO 3) You are creating a table called Department with fields for the primary key DeptID (Integer) and department name (VARCHAR). What (if anything) is wrong with the following code?
CREATE TABLE Department
(
deptID INTEGER Primary Key,
deptName VARCHAR(10) NOT NULL,
); (Points : 4)

Explanation / Answer

2. Ans: Foreignh key.

Foreign key is the only one which is applied by using ALTER statement.

3) CREATE TABLE Department
(
deptID INTEGER Primary Key,
deptName VARCHAR(10) NOT NULL,
);

The above syntax is perfect and there is nothing wrong./


7.) A left join returns rows in the right table that don’t satisfy the join condition.


8) In tat situation generally we uses Inner subquery.

9)
HAVING can only be used along with WHERE.
WHERE operates on individual rows and HAVING operates on groups formed by aggregate functions.

The above two statements are correct regarding where and having.

10) AS per given query

CREATE VIEW example AS
SELECT vendor_name, SUM(invoice_total) AS “Invoice Sum”
FROM vendors JOIN invoices ON vendors.vendor_id = invoices.vendor_id
GROUP BY vendor_name ORDER BY vendor_name;

It will succeed.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote