Page 325 - IT 402 v2.0 class 10
P. 325
6. What is a table?
Ans. A Table is a collection of organised data in the form of rows and columns. It is used to represent the various
relations.
For example, Roll No Name Class Marks
101 ABC X 97
102 PQR X 96
7. Write the Syntax to create a table.
Ans. CRE AT E T AB L E T AB L E _ NAM E
(
Colu mn_ Name1 D ata_ T y p e ( Siz e) ,
Colu mn_ Name2 D ata_ T y p e ( Siz e) ,
Colu mn_ Name3 D ata_ T y p e ( Siz e) ,
… … … … … … …
Colu mn_ NameND ata_ T y p e ( Siz e)
) ;
8. What is a Query?
ns. uery is a commands that is used to define the data structure and also to manipulate the data in the database.
It is used to filter specific information from a single table or multiple tables as per the re uirement or criteria.
. riefly explain Select statement.
Ans. A ‘SELECT’ statement retrieves zero or more rows from one or more database tables or database views. It has
many optional clauses:
specifies which rows to retrieve.
O specifies an order in which to return the rows.
Syntax,
SE L E CT * F RO M T AB L E _ NAM E
Displays all the records in the table.
SE L E CT * F RO M T AB L E - NAM E W H E RE ( Cr iter ia)
Displays the records according to the mentioned criteria.
SE L E CT * F RO M T AB L E - NAM E O RD E R B Y F I E L D _ NAM E ASCE ND I NG
isplays all the records of the mentioned table in ascending order of mentioned fields.
10. Consider the Teachers table given below:
TEACHERS
NUMBER NAME AGE SUBJECT DATE OF JOIN S GENDER
1 JUGAL 34 COMPUTER 10/01/2019 12000 M
2 PRATIGYA 31 SCIENCE 24/03/2019 20000 F
3 SANDEEP 32 MATHS 12/12/2019 30000 M
4 SANGEETA 35 SCIENCE 01/07/2020 40000 F
5 SATTI 42 MATHS 05/09/2020 25000 M
6 SHYAM 50 COMPUTER 27/06/2021 30000 M
7 SHIV OM 44 SCIENCE 25/02/2021 21000 M
8 SHALAKHA 33 MATHS 31/07/2020 20000 F
More on Database 323

