Notes-Class-X DBMS (Part-II)
Notes-Class-X DBMS (Part-II)
Session: 2024-25
Class X
Information Technology (402)
DATABASE MANAGEMENT SYSTEM
REVISION NOTES
Open Execute SQL statement window and write the following command:
Delete from dept where deptno=100;
Note: The Delete command without any condition will delete all records from the table.
Delete from dept;
Sorting Data
Sorting rearranges the data in an ascending or descending order.
Sort records in Datasheet view
To sort data in Libre Office Base, follow these steps:
Step 1 > Select the column which you want to sort.
Step 2 > Now click on appropriate button from the toolbar as highlighted below in
screenshot. Your datasheet displays the result accordingly.
Referential Integrity
The primary key and foreign key which are used for referential integrity, link more than one
table with each other. The referential integrity help to maintain the accuracy and consistency
of data in the relational database.
Like Operator : This operator is used to pattern matching criteria like the character is
starting with,ends with or have a specific position in the value. The ‘%’ is used to specified
any number of character whereas ‘_’ is used to specify the position of characters.
For example, you want to search a record whose fourth letter of name is ‘i’ and last
character is ‘T’, then the query will be written as –
Not Like Operator : Display all the records except the specified pattern matching
Is Null Operator : Display records with null values
Is Not Null Operator : Display records except null
Grouping Records
We can group the records based on the values of a specified column using GROUP BY
clause in the query.
Example:
select job, count(job) from emp group by job;