Create a table named Student with the following details Colu
Create a table named Student with the following details: Column Data Type Length Condition Values StudentID Int Not null (primary key) Name Varchar 25 Not null Major Text 4 Not null Level Varchar 10 -- Freshman, Sophomore, Junior, Senior GPA Decimal 2,2 2) Insert Sample Data 3) Write a program that accepts student id as input and displays student details. If the student doesn’t exist, display message. Files to be submitted • Student.sql • DisplayStudent.java
Solution
1.TABLE CREATION :-
CREATE TABLE Students
(
StudentID int Not null,
Name varchar(25) Not null,
Major Text(4) Not null,
Level varchar(10),
GPA Decimal(2,2),
PRIMARY KEY(StudentID)
);
2.DATA INSERTION :-
INSERT INTO Students (StudentID,Name, Major,Level)
VALUES (101,\'RAM\',\'SENIOR\',\'1\');
