COMP 266 Lecture 13: questions 13
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