COMP 266 Lecture 13: questions 13

30 views1 pages
Bookmark
Consider the following database:
Employee(emp-no, name, department, salary), ProjAssigned(emp-no, proj-no, worked-hours)
Write SQL queries to create the indexes you defined above.
View comments (1)
Expert Answer
CREATE INDEX Syntax for duplicate values :
CREATE INDEX index_name ON table_name (column_name)
CREATE INDEX Syntax for duplicate values not allowed :
CREATE UNIQUE INDEX index_name ON table_name (column_name)
CREATE INDEX index_Employee
on employee (emp-no, name,department,salary);
simple index is on a single column, while a composite index is on two or more columns
Comment
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 1 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents