The SQL keyword MODIFY is used to change the structure, properties or constraint
ID: 3912220 • Letter: T
Question
The SQL keyword MODIFY is used to change the structure, properties or constraints of a table.
Given the table STUDENT(StudentID, Name, Advisor), which of the following SQL statements would be used to change the value of the Advisor field to 'Smith' for all rows in the STUDENT table?
MODIFY STUDENT SET Advisor = 'Smith';
MODIFY Advisor SET STUDENT = 'Smith';
UPDATE STUDENT SET Advisor = 'Smith';
SET STUDENT Advisor = 'Smith';
UPDATE Advisor = 'Smith';
Given the table STUDENT(StudentID, Name, Advisor), which of the following SQL statements would be used to add new student data to the STUDENT table?
INSERT DATA STUDENT SET StudentID=123, Name='Jones', Advisor='Smith';
INSERT INTO STUDENT VALUES (123, 'Jones', 'Smith');
INPUT DATA STUDENT SET StudentID=123, Name=' Jones', Advisor='Smith';
INSERT INTO STUDENT (New Student Data) VALUES (123, 'Jones', 'Smith');
INPUT INTO STUDENT (123, 'Jones', 'Smith');
Given the SQL statement
CREATE TABLE SALESREP(
SalesRepNo int NOT NULL,
RepName char(35) NOT NULL,
HireDate date NOT NULL,
CONSTRAINT SalesRepPK PRIMARY KEY (SalesRepNo),
CONSTRAINT SalesRepAK1 UNIQUE (RepName)
);
we know that ________.
None of these statements are true
RepName is a candidate key
RepName is a foreign key
RepName is a surrogate key
RepName is the primary key
Which of the following removes all rows of data from the VEHICLE table?
REMOVE FROM VEHICLE
DROP TABLE VEHICLE
DELETE FROM VEHICLE
DROP VEHICLE
Which of the following SQL commands adds data to a database?
Both A and B
UPDATE FROM
ADD TO
INSERT INTO
Which command is used to add a column to an existing table?
None of THese
ALTER
CREATE
UPDATE
Which of the following is NOT a constraint in a DDL command?
Primary key
Alternate key
Unique
Foreign key
Save
Given the scenario of tracking store gift cards that includes these tables:
GIFT_CARD(CardNo, StoreName, Value, ActivationDate)
PURCHASE(TransactionID, tDate, Amt, Balance,CardNo)
Construct the SQL statement to answer this query:
What stores [list name only] have gift cards (no duplicates)?
True False GIFT CARD CardNo StoreName Value ActivationDate PURCHASE TransactionID Tdate Amt Balance CardNoExplanation / Answer
Question 1: False Question 2: UPDATE STUDENT SET Advisor = 'Smith'; Question 3: INSERT INTO STUDENT VALUES (123, 'Jones', 'Smith'); Question 4: RepName is a candidate key Question 5: DELETE FROM VEHICLE Question 6: INSERT INTO Question 7: ALTER Question 8: Alternate key
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.