Presentation 9

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Dbms project

by prajesh kumar
To give command to create a table click on tools
and select SQL from the dropdown menu
a dialog box appears:

In this dialog box in the 'command to execute' box


fill in the command to create a table:
1. Insert 10 records AND display all of them together
To insert records into a table, click on the tools option and
select the SQL option from the
dropdown menu and fill in the command to insert records in
the dialog box:

On repeating this command for the rest of the data and this
will be the result:
Add these Fields: TOTAL Decimal(5,2), AVERAGE
Decimal(5,2) To
STUDENTREPORT table.
To add new fields to the table STUDENTREPORT, follow
these steps: Select the table >
Right click > Select the option Edit > the table Design
View window will open
Write SQL command to Display all the records of STUDENTREPORT
table using query.

In order to display all the records of the table click on the Queries option
available on the
left side under database section, click Create Query in SQL View.
A window appears and after entering this statement (select * from
studentreport) all the
data in the table will be displayed like so:
Update TOTAL column and display the table contents
To update TOTAL column click on tools and select the SQL option from the dropdown
menu, enter this statement into the dialog box that appears:
UPDATE <table_name>

SET <column_name> = value[, column_ name = value ...]

[WHERE<condition>];

On repeating this command for all roll numbers, this will be the result:
Update AVERAGE column and display the table contents
To update AVERAGE column click on tools and select the SQL option
from the
dropdown menu, enter this statement into the dialog box that appears:

UPDATE <table_name>

SET <column_name> = value[, column_ name = value ...]

[WHERE<condition>];
Write SQL command to Display all the records of STUDENTREPORT
table using query.
In order to display all the records of the table click on the Queries option
available on the
left side under database section, click Create Query in SQL View.
A window appears and after entering this statement (select * from
studentreport) all the
data in the table will be displayed like so:
Write SQL command to display ROLLNO, NAME , TOTAL from the
STUDENTREPORT table.
To display only Roll number, name and total from our table we will go to
“create
query in SQL view” and give this command

Click to add text


Display the all records whose MATH marks above 90
To do so we will go to “create query in SQL view” and
give this command:
Display the maximum and minimum marks for ENG .
To do so we will go to “create query in SQL view” and
give this command:
Display the ROLLNO, NAME and AVERAGE whose NAME
starts with ‘A’ using SQL command.
To do so we will go to “create query in SQL view” and give this
command:
Display all the records from the STUDENTREPORT
table whose
NAME ends with ‘N’ using SQL command.
To do so we will go to “create query in SQL view”
and give this command:
Display all the record in ascending order of
NAMES.
Display the ROLLNO, NAME and AVERAGE whose
AVERAGE
between 70 & 100.
Display the ROLLNO, NAME , ENG , MATH , IT with
an
increment of 5 marks in each subject.
Thank you

You might also like