CREATE TABLE contact(
    contact_p_id INTEGER AUTO_INCREMENT,
    contact_name NVARCHAR(256) NOT NULL,
    contact_phone NVARCHAR(16),
    contact_mobile NVARCHAR(16),
    contact_address NVARCHAR(512),
    contact_city NVARCHAR(32),
    contact_zip NVARCHAR(8),
    contact_record_user NVARCHAR(32),
    contact_record_time DATETIME,
    CONSTRAINT pk_contact_p_id PRIMARY KEY (contact_p_id)
);

CREATE VIEW contact_search AS
SELECT contact_p_id AS id, 
       contact_name AS field
FROM contact
UNION
SELECT contact_p_id AS id, 
       contact_mobile AS field
FROM contact
UNION
SELECT contact_p_id AS id, 
       contact_phone AS field
FROM contact
UNION
SELECT contact_p_id AS id, 
       contact_address AS field
FROM contact
UNION
SELECT contact_p_id AS id, 
       contact_zip AS field
FROM contact
UNION
SELECT contact_p_id AS id, 
       contact_city AS field
FROM contact;
