0% found this document useful (0 votes)
27 views8 pages

Create Table Using SQL Command2

Uploaded by

Gurnoor Kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views8 pages

Create Table Using SQL Command2

Uploaded by

Gurnoor Kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Create table using SQL command.

Add Columns

1. Add column Total alter table "marksheet"


add column "Total" tinyint
2. Add column Percentage alter table
"marksheet" add column "Percentage"
decimal(5,2)
3. Add column grade alter table "marksheet"
add column "Grade" char(2)
2. Insert records
1. insert into "marksheet" values (101, 'Sagar',
105, 27, 25, 28, 80 , 88 , 'B1')
3. Steps to perform a query using design view
1. Click Queries Create Query in Design View….
2. The query design window will open.
3. Select the marksheet table and click on Add
button.
4. Now select fields given in the question like
name, rollno, marks,Sub101, Sub102, Sub103,
Total and Percentage.

2. Insert records
1. insert into "marksheet" values (101, 'Sagar',
105, 27, 25, 28, 80 , 88 , 'B1')
3. Steps to perform a query using design view
1. Click Queries Create Query in Design View….
2. The query design window will open.
3. Select the marksheet table and click on Add
button.
4. Now select fields given in the question like
name, rollno, marks,Sub101, Sub102, Sub103,
Total and Percentage.

5. save the query.


6. Display the rollno, name and percentage
whose percentage are more than 70 using design
view
1. Click Queries Create Query in Design View….

2. The query design window will open.


3. Select the marksheet table and click on Add
button.

4. Select columns given in the question i.e.


Rollno, Name and Percentage.

5. Type >70 in the front of criteria under the


percentage field.
6. Save the query and check the result.
FORMS

You might also like