In this article we providing information regarding LibreOffice Base All SQL Commands and Queries for Class 10 Information Technology.
LibreOffice Base All SQL Commands and Queries for Class 10
SQL Commands
- DDL COMMANDS
- CREATE TABLE
- DROP
- ALTER
- DML COMMANDS
- INSERT
- SELECT
- UPDATE
- DELETE
Query for CREATE TABLE Command
- CREATE TABLE STUDENT (RNO INTEGER PRIMARY KEY, NAME VARCHAR(20), STREAM VARCHAR(20), MARKS INTEGER );
Query for Insert Data in table Command
- INSERT INTO STUDENT VALUES (1, ‘TRUSHA’, ’COMMERCE’,80);
Write SQL commands to display all the records
- SELECT * FROM STUDENT;
Write the SQL command to display records of column name and marks
- SELECT NAME, MARKS FROM STUDENT ;
Write the SQL command to display records of Science stream students
- SELECT * FROM STUDENT WHERE STREAM =’SCIENCE’ ;
Write the SQL command to display records of those students who secured marks more than 70 from Arts stream
- SELECT * FROM STUDENT WHERE MARKS>70 AND STREAM =’ARTS’ ;
Write the SQL command to display distinct stream (Repeated values displayed only once)
- SELECT DISTINCT STREAM FROM STUDENT;
Write the SQL command to display records of students whose marks are between 60 and 95.
Here, boundary values, i.e. 60 and 95 will be also included.
- SELECT * FROM STUDENT WHERE MARKS BETWEEN 60 AND 95 ;
Write SQL command to update the Stream of RollNo 10 from Arts to Commerce
- UPDATE STUDENT SET STREAM =’COMMERCE’ WHERE ROLLNO=10;
- UPDATE STUDENT SET GENDER =’F’ WHERE NAME=’ROHAN’;
Write SQL Command to Delete the record of the student having roll number 10
- DELETE FROM STUDENT WHERE ROLLNO=10;
Write SQL command to Display the records in ascending order, according to their names By default order is asc
- SELECT * FROM STUDENT ORDER BY NAME;
