Informatics Practices

I. Write an SQL statement to create a table named STUDENTS, with the following specifications:

Column NameData TypeKey
StudentIDNumericPrimary Key
FirstNameVarchar(20)
LastNameVarchar(10)
DateOfBirthDate
PercentageFloat(10, 2)

II. Write SQL Query to insert the following data in the Students Table

1, Supriya, Singh, 2010-08-18, 75.5

SQL Queries

3 Likes

Answer

I.

CREATE TABLE STUDENTS ( 
StudentID NUMERIC PRIMARY KEY, 
FirstName VARCHAR(20),
LastName VARCHAR(10), 
DateOfBirth DATE, 
Percentage FLOAT(10,2) 
);

II.

INSERT INTO STUDENTS (StudentID, FirstName, LastName, 
DateOfBirth, Percentage) VALUES (1, 'Supriya', 'Singh', '2010-08-18', 
75.5); 

Answered By

1 Like


Related Questions