DBMS WITH MS Access
MS Access - เคฎाเคเค्เคฐोเคธॉเคซ़्เค เคเค्เคธेเคธ (Microsoft Acess) เคเค เคกेเคाเคฌेเคธ เคช्เคฐเคฌเคจ्เคงเคจ เคช्เคฐเคฃाเคฒी เคนै, เคिเคธเคी เคฐเคเคจा เคเคฐ เคตिเคคเคฐเคฃ เคฎाเคเค्เคฐोเคธॉเคซ्เค เคจे
เค
เคชเคจी เคฎाเคเค्เคฐोเคธॉเคซ्เค เคตिเคจ्เคกोเค़ เคเคฐ เคฎैเค เคเคเคธ เคเค्เคธ เคे เคฒिเค เคिเคฏा เคนै। เคฏเคน เค
เคจुเคช्เคฐเคฏोเค
เคฎाเคเค्เคฐोเคธॉเคซ्เค เคเคซिเคธ เคा เคเค เคญाเค เคนै। เคเคธเคा เคเคชเคฏोเค เคกेเคाเคฌेเคธ เคฌเคจाเคจे, เคกेเคाเคฌेเคธ เคो เคฎैเคจेเค เคเคฐเคจे, เคตिเคถ्เคฒेเคทเคฃ เคเคฐเคจे เคเคตं เคฐिเคชोเคฐ्เค เคฌเคจाเคจे เคฎें เคिเคฏा
เคाเคคा เคนै।
Home>Views>Design view
Create a field:- Employee - Data Field เคจिเคฎ्เคจाเคจुเคธाเคฐ เคฌเคจाเค
Field name Data
type Description
ID Auto
number
NAME TEXT
AGE Number
POST TEXT
SALARY CURRENCY
DOJ DATE
ENDER LOOKUP
WIZARD
Then SELECT datasheet view from View enter Enter 10 records
on it like this
|
EMPLOYEE
|
|
ID
|
NAME
|
AGE
|
POST
|
SALARY
|
DOJ
|
GENDER
|
MOBILE
|
DOCUMENTS
|
|
1
|
RAVIKANT SAHU
|
35
|
PEON
|
$15,000.00
|
01-MAY-00
|
MALE
|
87985758444
|
SELECT photo for everyone.
|
|
2
|
SEEMA SINGH
|
30
|
GARD
|
$16,000.00
|
01-JUN-05
|
FEMALE
|
65435453544
|
|
3
|
SURESH
|
25
|
MANAGER
|
$25,000.00
|
01-JUN-15
|
MALE
|
65465454444
|
|
4
|
DURYODHAN
|
26
|
AG3
|
$25,500.00
|
01-MAY-05
|
MALE
|
35564545444
|
|
5
|
SURESH
|
27
|
FIELD ASS
|
$19,900.00
|
01-SEP-09
|
MALE
|
64654654544
|
Form - MS Access เคฎें เคซाเคฐ्เคฎ เคा เคช्เคฐเคฏोเค เคिเคธी เคกेเคाเคฌेเคธ เคेเคฌเคฒ
เคฎें เคกाเคा เคो เคธเคฐเคฒเคคा เคชूเคฐ्เคตเค เคช्เคฐเคตिเคท्เค(Enter) เคเคฐเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै. เคฆूเคธเคฐे เคถเคฌ्เคฆों เคฎें เคो เคเคชเคे เคกाเคाเคฌेเคธ เคซाเคเคฒ
เคฎें เคเคชเคจे tables เคฌเคจाเค เคนैं
เคเคจ tables เคฎें เคฌเคนुเคค
เคเคธाเคจी เคธे เคกाเคा เคो เค
เคฐ्เคฅाเคค เคฐिเคाเคฐ्เคก เคो เคซाเคฐ्เคฎ เคे เคฆ्เคตाเคฐा เคฐเค เคธเคเคคे เคนैं|
Report
- MS
Access เคฎें เคฐिเคชोเคฐ्เค เคा เคช्เคฐเคฏोเค เคนเคฎ Database
File เคฎें เคเคชเคฒเคฌ्เคง เคฐिเคॉเคฐ्เคก เค
เคฐ्เคฅाเคค เคกाเคा เคो เคช्เคฐिंเคेเคก เค
เคฐ्เคฅाเคค เคช्เคฐिंเคเคฐ
เคฆ्เคตाเคฐा เคाเคชी เคเค เคชेเค เคชเคฐ เคธूเคเคจाเคं เคिเคจ्เคนें เคนाเคฐ्เคก เคॉเคชी เคเคนा เคाเคคा เคนै, เคो เคช्เคฐเคธ्เคคुเคค เคเคฐเคจे เคा เคช्เคฐเคญाเคตเคถाเคฒी เคคเคฐीเคा
เคนै.
Relationship
- เคฎाเคเค्เคฐोเคธॉเคซ्เค เคเค्เคธेเคธ เคฎें เคฆो เค
เคฒเค-เค
เคฒเค เคेเคฌเคฒ เคे เคกाเคा เคो เคเคฎ्เคฌाเคเคจ เคเคฐเคจे เคे
เคฒिเค เคฐिเคฒेเคถเคจเคถिเคช เคा เคช्เคฐเคฏोเค เคिเคฏा เคाเคคा เคนै। เคฐिเคฒेเคถเคจเคฒ เคกेเคाเคฌेเคธ เคฎें เคฆो เคेเคฌเคฒ เคे เคกाเคा เคเคชเคธ
เคฎें เคुเคก़े เคนोเคคे เคนैं เคฏाเคจि เคเคจเคฎे เคोเค เคจ เคोเค เคธเคฎ्เคฌเคจ्เคง เคนोเคคा เคนै। เคเคฎเคเคธ เคเค्เคธेเคธ เคे เคกेเคธ्เคเคॉเคช
เคเคช्เคช เคฎें เคฐिเคฒेเคถเคจเคถिเคช เคเคฎांเคก เคฎें เคाเคเคฐ เคฐिเคฒेเคถเคจเคถिเคช เค्เคฐिเคเค เคिเคฏा เคा เคธเคเคคा
เคนै।
Types
Of Relationship :
One
To One - เคเคธ เคฎें เคเค เคेเคฌเคฒ เคी เคเค Row เคฆूเคธเคฐी เคेเคฌเคฒ เคी เคญी เคेเคตเคฒ เคเค Row เคธे เคธंเคชเคฐ्เค เคฌเคจाเคเคी|
One
To Many - เคเคธ
เคฎें เคเค เคेเคฌเคฒ เคी เคเค Row เคฆूเคธเคฐी เคेเคฌเคฒ เคी เคเค เคธे เค
เคงिเค Row เคे
เคธाเคฅ เคธंเคชเคฐ्เค เคฌเคจा เคธเคเคคी เคนै।
Many
To Many- เคเคธ เคฎें เคเค เคेเคฌเคฒ เคी เคเค เคฏा เคเค เคธे เค
เคงिเค Row เคฆूเคธเคฐी
เคेเคฌเคฒ เคी เคेเคตเคฒ เคเค Row เคे เคธाเคฅ เคนी เคธंเคชเคฐ्เค เคฌเคจा เคธเคเคคी เคนै।
Join - เคॉเคเคจ เคเคชเคฐेเคถเคจ เคा เคเคชเคฏोเค เคॉเคเคจ เคू เคเคชเคฐेเคถเคจ เคे เคฒिเค เคिเคฏा
เคाเคคा เคนै เคฏเคน เคॉเคเคจ
เคเคชเคฐेเคถเคจ เคाเคฐ्เคคीเคฏ เคुเคฃเคจ เคเคฐ เคเคฏเคจ เคช्เคฐเค्เคฐिเคฏा เคा เคเค เคธंเคฏोเคเคจ เคนै join operation เคฎें เคนเคฎ cartesian operation perform เคเคฐเคคे
เคนैं เคเคฐ เคเคธเคे เคเคชเคฐ selection process apply เคเคฐเคคे
เคนैं।
Join Operation เคฆो เคช्เคฐเคाเคฐ เคे เคนोเคคे เคนैं:-
1.
Inner Join - inner join เคฎें Normal, Theta, เคเคฐ Equi join เคนोเคคा เคนैं. Resulting
Relation เคฎें Inner join เคฎें เคธिเคฐ्เคซ เคตเคนी tuples เคเคคे เคนैं เคो match เคนोเคคे เคนिเคฏँ เคฌाเคि เคธเคฌ discard เคเคฐ เคฆिเค เคाเคคे เคนैं।
2.
Outer Join – เคฆो เคेเคฌเคฒ्เคธ เคो join เคเคฐเคคे เคธเคฎเคฏ เคฏเคน เคเคตเคถ्เคฏเค
เคจเคนीं เคนैं เคी เคเค table เคे row เคฏा เคกाเคा เคฆूเคธเคฐे table เคे row เคฏा data เคธे เคฎैเค เคนो, เคเคธเคฎें เคो เคกाเคा เคฎैเค เคจเคนीं เคนोเคคा
เคนैं เคตो เคญी include เคिเคฏा เคाเคคा เคนैं। Outer Join
3 เคช्เคฐเคाเคฐ เคा เคนोเคคा เคนैं:-
§ Left Outer Join- left outer join เคฎें
join condition เคी
เคฌाเคฏीं เคเคฐ เคे tables เคे
เคธाเคฐे เคฐिเคॉเคฐ्เคก เคช्เคฐเคฆเคฐ्เคถिเคค เคिเคฏे เคाเคคा เคนैं, เคเคธ เคช्เคฐเคाเคฐ เคी condition เคे เคฆाเคฏीं เคเคฐ matching record เคो เคช्เคฐเคฆเคฐ्เคถिเคค เคिเคฏा เคाเคคा เคนैं।
§ Right Outer Join right outer join เคฎें
join condition เคी
เคฆाเคฏीं เคเคฐ เคे tables เคे
เคธाเคฐे เคฐिเคॉเคฐ्เคก เคช्เคฐเคฆเคฐ्เคถिเคค เคिเคฏे เคाเคคा เคนैं, เคเคธ เคช्เคฐเคाเคฐ เคी condition เคे เคฌाเคฏीं เคเคฐ matching record เคो เคช्เคฐเคฆเคฐ्เคถिเคค เคिเคฏा เคाเคคा เคนैं।
§ Full Outer Join Full Outer Join เคฎें
LEFT table เคเคฐ RIGHT table เคฎें
matches เคนो
เคฏा เคจा เคนो เคฏे เคฆोเคจों table เคे
เคธเคญी records เคो return เคเคฐเคคा เคนै เค
เคเคฐ match เคจเคนीं เคนोเคคा เคนै เคคो ‘NULL'(no value) return เคนोเคคी
เคนै |
Primary Key - เคกेเคाเคฌेเคธ เคी เคคाเคฒिเคा (Table) เคฎें column เคฏा เคॉเคฒเคฎ
เคा เคธเคฎूเคน เคो เคนเคฎें เคตिเคถिเคท्เค เคฐूเคช เคธे เคชเคนเคाเคจเคจे เคฎें เคฎเคฆเคฆ เคเคฐเคคा เคนै เคเคธ เคคाเคฒिเคा เคी เคช्เคฐเคค्เคฏेเค
เคชंเค्เคคि(row) เคो
เคช्เคฐाเคฅเคฎिเค เคुंเคी เคเคนा เคाเคคा เคนै।
Unique Key - เคเค เคคाเคฒिเคा
เคฎें, Unique keys เคช्เคฐเคคिเคฌंเคง
เคนोเคคी เคนैं เคिเคจเคा เคเคชเคฏोเค เคตिเคถिเคท्เค เคฐूเคช เคธे เคुเคชเคฒ्เคธ (rows) เคी เคชเคนเคाเคจ
เคเคฐเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै। เคคाเคฒिเคा เคฎें เคเค เค
เคฆ्เคตिเคคीเคฏ เคुंเคिเคฏाँ (unique keys) เคนो เคธเคเคคी
เคนैं। เคฏเคฆि เคเค เค
เคฆ्เคตिเคคीเคฏ เคुंเคी เคा เคเคชเคฏोเค เคिเคฏा เคाเคคा เคนै,
เคคो เคुंเคी เคा เคฎाเคจ NULL
เคชเคฐ เคธेเค เคिเคฏा เคा เคธเคเคคा เคนै।
Foreign Key : เคเค เคธंเคฌंเคง (relation)
เคे เคเคธे เคเคเคฐเคฌ्เคฏूเคเคธ,
เคो เคिเคธी เค
เคจ्เคฏ
เคธंเคฌंเคง (relation) เคी เคเค เคเคฎ्เคชเคฎीเคฆिाเคฐ เคुंเคी (Candidate
Key) เคธे เคฎेเคฒ เคाเคคे เคนै, เคซॉเคฐेเคจ เคी เคเคนเคฒाเคคे เคนैं । เคเค เคธंเคฌंเคง (relation) เคฎें เคเค เคตिเคฆेเคถी เคुंเคि
(เคซॉเคฐेเคจ เคी / Foreign Key) เคนो เคธเคเคคी เคนैं,
เคฏे เคुंเคीเคฏाँ เคตिเคถเคญเคจ्เคจ เคธंเคฌंเคงों (relations)
เคธे เคुเคก़ी เคนो เคธเคเคคी
เคนैं।
Query
- เคเคฎ. เคเคธ. เคเค्เคธेเคธ
เคฎें เคฏूเคเคฐ เคเค เคช्เคฐเคाเคฐ เคธे เค
เคชเคจे เคกेเคा เคो เคขूँเคข เคธเคเคคे เคนैं, เคเคธे เคाँเค
เคธเคเคคे เคนैं เคเคฐ เคช्เคฐเคฆเคฐ्เคถिเคค เคเคฐ เคธเคเคคे เคนैं। เค
เคจाเคตเคถ्เคฏเค เคฆोเคนเคฐाเคต เคธे เคฌเคเคจे เคे เคฒिเค เคฏूเคเคฐ เคขूँเคขเคจे
เคी เคถเคฐ्เคคों เคो เคเคे เคे เคช्เคฐเคฏोเค เคे เคฒिเค เคฌเคाเคเคฐ เคญी เคฐเค เคธเคเคคे เคนैं। เคเคธ เคช्เคฐเคाเคฐ เคตांเคिเคค เค
เคจुเคธाเคฐ เคोเค เคกेเคा เคขूँเคขเคจा เค्เคตैเคฐी
เคเคนเคฒाเคคा เคนै।
ร
Query with design view- เค्เคตेเคฐी
เคกिเฅाเคเคจ เคฌเคจाเคจे เคे เคฒिเค เคจिเคฎ्เคจ เคเคฐเคฃ เค
เคชเคจाเคฏे
Create
Query wizard from Create>other>Query Wizard> SELECT Simple Query
Wizard>SELECT all field >Next> Detail>Next>SELECT Modify the
query>Finish
(เคเคช เคธเคญी เคคाเคฒिเคाเคं เคชเคฐ เคเคฐ्เคฎเคाเคฐी
เค्เคตेเคฐी เคฆेเค เคธเคเคคे เคนैं เคเคฐ เคซिเคฐ เคชैเคจเคฒ เคชเคฐ เค्เคฒिเค เคเคฐ เคธเคเคคे เคนैं)
Home>View>SELECT Design View>
and Do your Query & Run it in many ways like this :-
Show
:- เคคाเคฒिเคा เคชเคฐ เคเคฏเคจिเคค เคซ़ीเคฒ्เคก เคฆिเคाเคจे เคे เคฒिเค เคिเคน्เคจिเคค เคเคฐें
Sort :- เคเคฐोเคนी เคเคฐ เค
เคตเคฐोเคนी เค्เคฐเคฎ เคฎें เคธเคญी เคฐिเคॉเคฐ्เคก
เคฆेเคเคจे เคे เคฒिเค
Criteria :- เคคाเคฒिเคा
เคा เคเคฏเคจिเคค เคถ्เคฐेเคฃी เคตिเคตเคฐเคฃ เคฆेเคเคจे เคे เคฒिเค
a*
in name field, - for see all employee name started wit 'a'
or :-
เคเค เคธे เค
เคงिเค เคเคฏเคจिเคค เคถ्เคฐेเคฃी
เคตिเคตเคฐเคฃ เคฆेเคเคจे เคे เคฒिเค เคเคฆ्เคฆाเคนเคฐเคฃ age>33,salary<25000
เคกेเคाเคฌेเคธ เคे เคเคงाเคฐ เคชเคฐ
เคจिเคฎ्เคจเคช्เคฐเคถ्เคจो เคे เค्เคตेเคฐी เคฌเคจाเคฏे :-
Que.1 Write
a query to display all Age greater then 33 ?
Query - Age , criteria >33
Que - Write
a query to display all Male record?
Design View – Gender Field , criteria
=’male’
Que - Write
a query to display all Manager?
Que Write
a query to display record of junaid?
Que Write
a query to display all Age greater then 33 and salary<25000
Que Write
a query to display all peon list?
Que Write
a query to display male list where salary is >40000
Que Write
a query to display male & female ascending order?
Que Write
a query to display descending order of age, salary, gender male fist?
RDBMS WITH SQL
Relational Data Base
Management System with Structured Query Language
SQL (เคธ्เค्เคฐเค्เคเคฐ्เคก เค्เคตेเคฐी เคฒैंเค्เคตेเค) เคเค เคंเคช्เคฏूเคเคฐ เคญाเคทा เคนै เคो เคกेเคाเคฌेเคธ เคช्เคฐोเค्เคฐाเคฎ เคฆ्เคตाเคฐा เคธเคฎเคी เคाเคจे เคตाเคฒी เค
ंเค्เคฐेเคी เคธे เคाเคซी เคฎिเคฒเคคी-เคुเคฒเคคी เคนै। SQL เคो เคाเคจเคจा เคฎเคนเคค्เคตเคชूเคฐ्เคฃ เคนै เค्เคฏोंเคि Microsoft Access เคฎें เคช्เคฐเคค्เคฏेเค เค्เคตेเคฐी SQL เคा เคเคชเคฏोเค เคเคฐเคคी เคนै। เคฏเคน เคธเคฎเคเคจा เคि SQL เคैเคธे เคाเคฎ เคเคฐเคคा เคนै, เคฌेเคนเคคเคฐ เค्เคตेเคฐी เคฌเคจाเคจे เคฎें เคฎเคฆเคฆ เคเคฐ เคธเคเคคा เคนै, เคเคฐ เคเคชเคे เคฒिเค เคिเคธी เค्เคตेเคฐी เคो เค ीเค เคเคฐเคจा เคเคธाเคจ เคฌเคจा เคธเคเคคा เคนै เคเคฌ เคตเคน เคเคชเคे เคเค्เคिเคค เคชเคฐिเคฃाเคฎ เคจเคนीं เคฒौเคा เคฐเคนा เคนो।
ร
SQL clause Work :-
Types of SQL :- Here are five types of widely
used SQL queries.
- Data Definition Language (DDL)
- Data Manipulation Language (DML)
- Data Control Language(DCL)
|
- Transaction Control Language(TCL)
- Data Query Language (DQL)
|
SQL Commands with Query Report
Make table using SQL commands
|
Student
|
|
ROLLNO
|
SNAME
|
FNAME
|
GENDER
|
CLASS
|
SEC
|
PERCENT
|
RESULT
|
|
101
|
RAGINI
|
VISHAL
|
FEMALE
|
11
|
B
|
78
|
PASS
|
|
102
|
SOHAN
|
SOKESH
|
MALE
|
11
|
B
|
72
|
PASS
|
|
103
|
ROHAN
|
ROKESH
|
MALE
|
12
|
A
|
76
|
PASS
|
|
104
|
JOHAN
|
JOKESH
|
MALE
|
10
|
A
|
55
|
PASS
|
|
105
|
MOHAN
|
MOKESH
|
MALE
|
10
|
B
|
34
|
FAIL
|
|
106
|
TOHAN
|
TOKESH
|
MALE
|
10
|
B
|
36
|
FAIL
|
|
107
|
VOHAN
|
VOKESH
|
MALE
|
11
|
A
|
75
|
PASS
|
|
108
|
SIMA
|
SOKESH
|
FEMALE
|
12
|
A
|
68
|
PASS
|
|
109
|
RIMA
|
TOKESH
|
FEMALE
|
12
|
B
|
64
|
PASS
|
|
110
|
TINA
|
JOKESH
|
FEMALE
|
12
|
B
|
58
|
FAIL
|
|
111
|
RINA
|
ROKESH
|
FEMALE
|
11
|
A
|
45
|
FAIL
|
ร
To Create a table
|
1.
Student Mark data
Create
table student
(
rollno
int not null primary key,
sname
varchar(20),
fname
varchar(20),
gender
varchar(10),
class
int,
sec
varchar(1),
Percent
int,
result
varchar(10)
)
|
2.
Student
Fee Detail
Create table studentfee
(
rollno int not null primary key,
sname varchar(20),
RegFee int,
Installment1 int,
Installment2 int,
Installment3 int,
Installment4 int,
ExamFee int
)
|
3.
Student
Fee Detail
Create table studentlib
(
rollno int not null primary key,
sname varchar(20),
Ba1 varchar(20),
Badate1 varchar(20),
Submisiondate
Ba2 varchar(20),
Badate2 varchar(20),
Submisiondate
)
|
ร
To Add Record on Table :-
INSERT INTO student VALUES (ROLLNO,'sname','fname', 'gender',
class,'sec',persent,'result');
INSERT INTO student VALUES (101, 'RAGINI','VISHAL',
'Female', 11,'B',78, 'PASS');
Same
as Add 20 Record in student table
Query 01- Write a query to Add 20 new
Student record
ร
To Display a record
Que.1 - Write a query to display all female record?
Query SELECT
* from student where gender='female'
Que.2 Write
a query to display all Pass student?
Query SELECT
* from student where result='pass'
Que.3 Write
a query to display all 10th student list?
Query
SELECT * from student where
class=10
Que.4 Write
a query to display all Student name, Father's name & Result?
Query
SELECT sname, fname, result from
student
Que.5 -
Write a query to display record between rollno 104 and 110
Query SELECT
* FROM student WHERE rollno between 104 and 110
Que.6 Write a
query to display record name started with 'm' character.
Query SELECT
* from student where sname like 'm*'; ‘R%’ WILD CARD
Que.7 Write
a query to display all Male record?
Query
Que.8 Write
a query to display all Fail student?
Query
Que.9 Write
a query to display all 12th student list?
Query
Que.10 Write
a query to display all A sec Student detail?
Query
Que.11 Write
a query to display of Student name is Rohan detail?
Query
Que.12 Write
a query to display of Student which father's name is Tokesh?
Query
Que.13 Write
a query to display all Rollno, Student name, class?
ร
Use it also with Relation operators
Equal to = , Does not Equal <>
Greater then > , Greater then & Equal
to >=
Less then < , Less then & Equal to
<=
Note :- (Use
'B' for character data its not use in numeric data)
SELECT
* from student where percent>50 (Display all record There Percent Greater
then 50)
SELECT
* from student where percent<50 (Display all record There Percent Less then
50)
SELECT
* from student where percent=50 (Display all record There Percent Equal to 50)
SELECT
* from student where percent<=50 (Display all record There Percent Less then
& Equal to 50)
SELECT
* from student where percent>=50 (Display all record There Percent Greater
then & Equal to 50)
SELECT
* from student where percent<>50 (Display all record There Percent
Doesn’t 50)
Que.1 Write
a query to display all 10th student list?
Query
Que.2 Write
a query to display all 11th student list?
Query
Que.3 Write
a query to display all 12th student list?
Query
Que.4 Write
a query to display all list after roll no. 105?
Query
Que.5 Write
a query to display all list Before roll no. 105?
Query
Que.6 Write
a query to display of roll no. 105?
ร
To Display a record with Join Operator
AND When Enter All value is true
OR When Entered value may be some
has true some has false both conditions
NOT When Enter All value are false
Query - Write a query to display all pass female student which has pass
SELECT *FROM student where
gender='female' and result='pass'
Query - Write a query to display all Male student of class 11th
SELECT
*FROM student where gender='male' and class=11
Query - Write a query to display all 12th student there
Percentage is Greater then 70
SELECT
*FROM student where class=12 and percent>70
Query - Write a query to display all pass Male student which has pass?
Query - Write a query to display all Male students in class 12th?
Query - Write a query to display all Student of class 11th
Sec A?
Query - Write a query to display all class 11th & 12th?
Query - Write a query to display all Pass Student in 11th?
Query - Write a query to display all record of second division student?
Query - Write a query to display all Third Division Student list of 12th
class?
Query - Write a query to display all fail students Only Roll no &
name of 12th class?
ร
Sorting with Records
For Ascending – asc; , For descending – desc;
Que.1 Write
a query to display name is ascending order.
Query SELECT * FROM Student ORDER BY Student.SNAME asc;
Que.2 Write
a query to display name is descending order.
Query SELECT
* FROM Student ORDER BY Student.SNAME DESC;
Que.3- Write
a query to display Class wise is ascending order?
Query
Que.4 - Write a query to display gender wise is ascending order?
Query
Que.5- Write
a query to display result wise is descending order. ?
Que.6 - Write a query to display Class & sec wise is ascending
order. ?
Que.7 - Write a query to display name is descending order. ?
ร
Use Count Function
Query - Write a query to display total
number of male & female.
SELECT gender, count(*) from student
GROUP BY gender;
Same do for male, class, Percentage, etc,
SELECT Max(percent) from student ;
Aggregate function – count, sum, max, min, avr ,
Query - Write a query to display total
number of Pass & Fail?
uery - Write a query to display total
number of 10th, 11th & 12th?
Query - Write a query to display total
number Section in student detail. ?
ร
Deleting Records
Query - Write a query to delete all sec
c student?
Delete * from student where sec='c'
Query - Write a query to delete all
fail student?
Query - Write a query to delete all
Female?
Query - Write a query to delete all
Percent less then 40?
Same do for male, class, Percentage, etc,
Query - Write a query to Update section
A for sohan student.
Update
student SET sec ='A' where name='Rina'
Query - Write a query to Update Student
name RIMA TO REEMA
Query - Write a query to Update Student
name RIMA TO REEMA
Same do for male, class, Percentage, etc,
ร
Work with Column
To Add Column
Alter table Student
ADD
column dob date
To Alter Column
Alter
table Student
Alter
column dob text
To Delete Column
Alter
table Student
DROP column dob date
To Delete data from Column
Alter
table Student
Truncate column dob date