Question
The SQL keyword MODIFY is used to change the structure, properties or constraints of a table. True False Given the table STUDENT(StudentID, Name, Advisor), which
The SQL keyword MODIFY is used to change the structure, properties or constraints of a table.
True | |
False |
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)?
GIFT CARD CardNo StoreName Value ActivationDate PURCHASE TransactionID Tdate Amt Balance CardNoStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started