Test Your Understanding 2 in SQL



Question:

Modify the given query appropriately in order to create the department table using the schema given below, considering the product table that you have already created.

COLUMN NAMEDATATYPESIZECONSTRAINT
dept_idnumber4Primary key
prod_idnumber4Foreign key
dept_namevarchar225Unique
dept_headvarchar225Not null

CODE:

CREATE table department
 ( dept_id number(4),
  prod_id number(4),
  dept_name varchar2(25) unique,
  dept_head varchar2(25) NOT NULL,
  PRIMARY KEY(dept_id),
  foreign KEY(prod_id) REFERENCES product(prod_id)
); 

 rdbms programs | rdbms database program | relational database management system software |  rdbms lab programs | rdbms lab programs pdf |  dbms programs | database management software | database management system software |  examples of database software| list of database applications | database system applications | examples of database | application database application software | database management application

rdbms programs | rdbms programs with output | rdbms programming languages | rdbms database program

best dbms software |  software that is used to create | manipulate and maintain a relational database | database management system application

Tags:- rdbms programs with output | rdbms programs pdf  | dbms programs examples | rdbms lab programs | rdbms lab programs pdf | rdbms practical programs | rdbms practical programs pdf | rdbms sample programs | rdbms program | rdbms system| rdbms lab programs madras university | rdbms online programs | rdbms lab programs with output | rdbms procedure program | rdbms sql programs

Previous
Next Post »