CLASS 10 UNIT 3 SESSION 4 IMPORTANT NOTES
SESSION 4: RETRIEVE DATA USING QUERY
Query:
Query is to collect specific information from the pool of data. A query helps us join information from different tables
and filter that information.
Filtering:
Filtering means that the query uses criteria you provide to hide some data and present only what you want to see.
SQL:
SQL (pronounced as “sequel”) or Structured Query Language. Query languages are computer languages used to make queries into databases and information systems. Queries are commands that are used to define the data structure and also to manipulate the data in the database.
Select:
A SELECT statement retrieves zero or more rows from one or more database tables or database views. SELECT is the most commonly used Data Manipulation Language(DML) command.
The SELECT statement has many optional clauses:
- WHERE specifies which rows to retrieve.
- ORDER BY specifies an order in which to return the rows.
To retrieve all the columns in a table
Syntax: SELECT * FROM < TABLENAME;
Grouping of Data:
To display the records containing the same type of values “WHERE” clause can be used with the Select SQL Command. To get details about the list of students whose favorite color is blue, you can use:
select * from SDetails where Color=’Blue’;
To view records in ascending order of RollNo, from the table the select statement will be:
select * from SDetails order by “RollNo” ASC;
UPDATE statement:
Update statement is used for modifying records in a database.
Syntax :
UPDATE <table_name>
SET<column_name> = value [, column_name = value …]
[WHERE<condition> ];
One thought on “CLASS 10 UNIT 3 SESSION 4 IMPORTANT NOTES”