Help with the follwing question on MYSQL Create the two separate indexes. instea
ID: 3840570 • Letter: H
Question
Help with the follwing question on MYSQL
Create the two separate indexes. instead of one for the following
a. composite index on the attributes last_name and first_name (in that order!) of the Bird table
Paste your CREATE INDEX statements below.
variety income Peacock bdate Owns first name Bird bname latitude longitude ast locati Cno senti ment Utter Chirp 1 (Original M (Chirper) N (Copy) Parrots About Bird level Listen name N (Listener M interests Topics bsecto date User Topics Listen Watcher Signup date password emai add State country For Bird, Watcher ISA User: picture street Bird AND Watcher COVER User number mailcodeExplanation / Answer
To create index on separate columns i.e first_name and last_name in Bird table, you can use the following
CREATE INDEX FNAME_INDEX
ON BIRD(FIRST_NAME);
CREATE INDEX LNAME_INDEX
ON BIRD(LAST_NAME);
There is another way to do the same -
ALTER TABLE BIRD
ADD INDEX FNAME_INDEX(FIRST_NAME);
ALTER TABLE BIRD
ADD INDEX LNAME_INDEX(LAST_NAME);
Please do rate the answer if it helped. Thanks.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.