Employee photo table (EMP_PHOTO)
The employee photo table contains a photo of each employee identified by an employee number.
The employee photo table is created with the following CREATE TABLE and ALTER TABLE statements:
CREATE TABLE EMP_PHOTO (EMPNO CHAR(6) NOT NULL, PHOTO_FORMAT VARCHAR(10) NOT NULL, PICTURE BLOB(100K), EMP_ROWID CHAR(40) NOT NULL DEFAULT '', PRIMARY KEY (EMPNO,PHOTO_FORMAT))ALTER TABLE EMP_PHOTO ADD COLUMN DL_PICTURE DATALINK(1000) LINKTYPE URL NO LINK CONTROL
ALTER TABLE EMP_PHOTO ADD FOREIGN KEY (EMPNO) REFERENCES EMPLOYEE ON DELETE RESTRICT
The following index is created:
CREATE UNIQUE INDEX XEMP_PHOTO ON EMP_PHOTO (EMPNO,PHOTO_FORMAT)The table below shows the content of the columns.
Column name Description EMPNO Employee number PHOTO_FORMAT Format of image stored in PICTURE PICTURE Photo image EMP_ROWID Unique row ID, not currently used
- EMP_PHOTO
Here is a complete listing of the data in the EMP_PHOTO table.
Parent topic:
DB2 Universal Database for iSeries sample tables