π Step-by-Step SQL Assignment Execution (Oracle Live SQL)
In this post, I am sharing my DBMS SQL Assignment execution using Oracle Live SQL.
I have included explanations and screenshots for each step to make the process clear and easy to follow.
1οΈβ£. Create Faculty Table (DDL)
The first task was to create a Faculty table with the following fields:
FacultyID β Primary Key
FacultyName β Not Null
Dept β Department name
Email β Unique constraint
2οΈβ£. Insert Students Data (DML)
Next, I inserted three students into the Students table, each belonging to different departments.
3οΈβ£ Alter Table β Add Phone Number
I modified the Students table to add a new column PhoneNo.
This column ensures that phone numbers are 10 digits long.
πΈ
4οΈβ£ Define Constraints on Courses Table
The Courses table was updated with a constraint to make sure that Credits cannot be less than 1 or more than 5.
5οΈβ£ SELECT with Functions
I displayed the student names in uppercase and also calculated the length of their email IDs.
Top comments (0)