Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need more explain with example to section b 1) () Create a table called STUDENT with the following structure. Name Type STUDID NUMBER(6) STUDNAME

i need more explain with example to section b

image text in transcribed

1) () Create a table called STUDENT with the following structure. Name Type STUDID NUMBER(6) STUDNAME VARCHAR2(20) CITY VARCHAR2(10) DEPTNO NUMBER(3) GPA NUMBER(7,2) STUDID 201345 201356 201455 201492 STUDNAME SARA ASMA AHMED MOIN CITY JAZAN SABYA SABYA JAZAN DEPTNO 1 1 GPA 4.1 3.5 4.8 5.0 NNI (ii) Create DEPARTMENT table with the following structure. DEPTNO 1 DNAME CS IT CNET COLLEGE College of CS College of IT CNET College 2 3 a) Add constraints to the STUDENT table that STUDID as the PRIMARY KEY and DEPTNO as the FOREIGN KEY. b) Add a column MOBILE to the STUDENT table with the constraint UNIQUE. c) Modify the column width of the STUDNAME field of STUDENT table. d) Add constraints to the STUDENT table to check the STUDID value while entering (i.) STUDID> 2013. e) GPA value by default is 2.0-Use the DEFAULT constraint to implement it. 1) Insert multiple records using INSERT ALL in STUDENT table g) Insert 1 row at a time in the DEPARTMENT table. h) Update the STUDENT table to set the GPA of all students to 4.5 who belongs to DEPTNO=1. i) List the records in the STUDENT table ORDERBY STUDID in ascending order. j) List the STUDENT NAMES and the DEPARTMENT NAME to which they belongs. k) Create the table STUDENT2 with all its columns from STUDENT using AS SELECT keyword

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

=+2 Is the decision sustainable in the long run?

Answered: 1 week ago