employees

Official MySQL example database

 

 

departments  
Fields
Field Type Collation Null Key Default Extra Privileges Comment

dept_no

char(4)

latin1_swedish_ci

NO

PRI

 

 

select,insert,update,references

 

dept_name

varchar(40)

latin1_swedish_ci

NO

UNI

 

 

select,insert,update,references

 

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment

departments

0

PRIMARY

1

dept_no

A

0

(NULL)

(NULL)

 

BTREE

 

departments

0

dept_name

1

dept_name

A

0

(NULL)

(NULL)

 

BTREE

 

Back

 

dept_emp  
Fields
Field Type Collation Null Key Default Extra Privileges Comment

emp_no

int(11)

(NULL)

NO

PRI

 

 

select,insert,update,references

 

dept_no

char(4)

latin1_swedish_ci

NO

PRI

 

 

select,insert,update,references

 

from_date

date

(NULL)

NO

 

 

 

select,insert,update,references

 

to_date

date

(NULL)

NO

 

 

 

select,insert,update,references

 

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment

dept_emp

0

PRIMARY

1

emp_no

A

(NULL)

(NULL)

(NULL)

 

BTREE

 

dept_emp

0

PRIMARY

2

dept_no

A

0

(NULL)

(NULL)

 

BTREE

 

dept_emp

1

emp_no

1

emp_no

A

(NULL)

(NULL)

(NULL)

 

BTREE

 

dept_emp

1

dept_no

1

dept_no

A

(NULL)

(NULL)

(NULL)

 

BTREE

 

Back

 

dept_manager  
Fields
Field Type Collation Null Key Default Extra Privileges Comment

dept_no

char(4)

latin1_swedish_ci

NO

PRI

 

 

select,insert,update,references

 

emp_no

int(11)

(NULL)

NO

PRI

 

 

select,insert,update,references

 

from_date

date

(NULL)

NO

 

 

 

select,insert,update,references

 

to_date

date

(NULL)

NO

 

 

 

select,insert,update,references

 

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment

dept_manager

0

PRIMARY

1

emp_no

A

(NULL)

(NULL)

(NULL)

 

BTREE

 

dept_manager

0

PRIMARY

2

dept_no

A

0

(NULL)

(NULL)

 

BTREE

 

dept_manager

1

emp_no

1

emp_no

A

(NULL)

(NULL)

(NULL)

 

BTREE

 

dept_manager

1

dept_no

1

dept_no

A

(NULL)

(NULL)

(NULL)

 

BTREE

 

Back

 

employees  
Fields
Field Type Collation Null Key Default Extra Privileges Comment

emp_no

int(11)

(NULL)

NO

PRI

 

 

select,insert,update,references

 

birth_date

date

(NULL)

NO

 

 

 

select,insert,update,references

 

first_name

varchar(14)

latin1_swedish_ci

NO

 

 

 

select,insert,update,references

 

last_name

varchar(16)

latin1_swedish_ci

NO

 

 

 

select,insert,update,references

 

gender

enum('M','F')

latin1_swedish_ci

NO

 

 

 

select,insert,update,references

 

hire_date

date

(NULL)

NO

 

 

 

select,insert,update,references

 

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment

employees

0

PRIMARY

1

emp_no

A

0

(NULL)

(NULL)

 

BTREE

 

Back

 

salaries  
Fields
Field Type Collation Null Key Default Extra Privileges Comment

emp_no

int(11)

(NULL)

NO

PRI

 

 

select,insert,update,references

 

salary

int(11)

(NULL)

NO

 

 

 

select,insert,update,references

 

from_date

date

(NULL)

NO

PRI

 

 

select,insert,update,references

 

to_date

date

(NULL)

NO

 

 

 

select,insert,update,references

 

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment

salaries

0

PRIMARY

1

emp_no

A

(NULL)

(NULL)

(NULL)

 

BTREE

 

salaries

0

PRIMARY

2

from_date

A

0

(NULL)

(NULL)

 

BTREE

 

salaries

1

emp_no

1

emp_no

A

(NULL)

(NULL)

(NULL)

 

BTREE

 

Back

 

titles  
Fields
Field Type Collation Null Key Default Extra Privileges Comment

emp_no

int(11)

(NULL)

NO

PRI

 

 

select,insert,update,references

 

title

varchar(50)

latin1_swedish_ci

NO

PRI

 

 

select,insert,update,references

 

from_date

date

(NULL)

NO

PRI

 

 

select,insert,update,references

 

to_date

date

(NULL)

YES

 

(NULL)

 

select,insert,update,references

 

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment

titles

0

PRIMARY

1

emp_no

A

(NULL)

(NULL)

(NULL)

 

BTREE

 

titles

0

PRIMARY

2

title

A

(NULL)

(NULL)

(NULL)

 

BTREE

 

titles

0

PRIMARY

3

from_date

A

0

(NULL)

(NULL)

 

BTREE

 

titles

1

emp_no

1

emp_no

A

(NULL)

(NULL)

(NULL)

 

BTREE

 

Back

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.