Jump to content

HTHVampire

Members
  • Posts

    1
  • Joined

  • Last visited

Previous Fields

  • Languages
    English

Profile Information

  • Location
    Malaysia

HTHVampire's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. From the tables that I attached, a. Assume Job relation is created. Write the SQL statement that will create the EMP relation (use the structure shown in Table 2) Following is my answer: Create Table EMP (empnum NUMBER(3), lname VARCHAR2(15) CONSTRAINT emp_lname_nn Not Null, fname VARCHAR2(25), mi CHAR(1), hiredate DATE CONSTRAINT emp_hiredate_nn Not Null, enddate DATE, Jobcode CHAR(3), Salary Number(10,2) CONSTRAINT emp_empnum_pk Primary Key (empnum), CONSTRAINT emp_jobcode_fk Foreign Key (jobcode) REFERENCES Job(job_code); b. Write the SQL statement that will enter the first data row into the EMP relation My answer: Insert into EMP values (101, 'O''Connel', 'John', 'mi', '11-Aug-2000', NULL, '502', 3600) For both of this questions, can someone checks with me whether am I doing it correctly? Please point out my mistakes if any, I appreciate your guides.Thank you!
×
×
  • Create New...