English

I. Write an SQL statement to create a table named STUDENTS, with the following specifications: Column Name StudentID FirstName LastName DateOfBirth Percentage Data Type Numeric Varchar(20) Varchar(10) - Informatics Practices

Advertisements
Advertisements

Question

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

Column Name Data Type Key
StudentID Numeric Primary Key
FirstName Varchar(20)  
LastName Varchar(10)  
DateOfBirth Date  
Percentage Float(10,2)  

II. Write SQL Query to insert the following data in the Students Table 1, Supriya, Singh, 2010-08-18, 75.5.

Code Writing
Advertisements

Solution

  1. CREATE TABLE STUDENTS (
    StudentID NUMERIC PRIMARY KEY,
    FirstName VARCHAR(20),
    LastName VARCHAR(10),
    DateOfBirth DATE,
    Percentage FLOAT(10,2)
    ); 
  2. INSERT INTO STUDENTS (StudentID, FirstName, LastName, DateOfBirth, Percentage) VALUES (1, 'Supriya', 'Singh', '2010-08-18', 75.5); 
shaalaa.com
  Is there an error in this question or solution?
2024-2025 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×