Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

School of Science and Engineering: Software Packages: MS Office 2010 (MS Word, Power Point)

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

School of Science and Engineering

Faculty of Computer Engineering

Subject: Server Side Programming

Subject Code: ECB 4241

Lab sheet 7

Topic: PHP – working with SQL

Software packages: MS Office 2010 (MS Word, Power point)


1. Instructions

 Practical sheets will be sent to the students after the theory coverage in the class.
 Students are required to read, understand and have light practice on the practical, before coming to the lab.
 Complete the problems solved in the lab on the same day itself.
 No postponement is allowed.
 Students are encouraged :
-to browse a new topics from different resources
- Practice other power full facilities available in the software packages

Student ID: ______________________________________________________

Student Name:

Date: / / 2016

1
Create 4 Tables as listed below keeping the table name and field names as given.

Enter appropriate Field types, Fields sizes, Primary Key, Foreign key
references, constraints etc.

Enter the data as shown in the images below.

1. Table 1 : Country

2. Table 2 : Painter

3. Table 3 : Gallery

4. Table 4 : Paintings

2
Q.2 Based on the above tables do the SQL queries as given below –

1. Write an SQL statement to alter table ‘paintings’ to add a column ‘created_date’.


2. Write an SQL statement to give any value to the newly column ‘created_date’ for all the
records. (table paintings)
3. Write an SQL to show all the paintings (painting_title, painting_num) for painter (rose) with
painting_num in the descending order.
4. Write an SQL to show no. of paintings belonging to each painter –

5. Write an SQL to show the painter first name and their country name for all the ‘females’
painters.

6. Write an SQL to show all the painter with names belonging to different countries as shown
below –

7. Write an SQL statement which shows output as below-

8. Write an SQL statement which shows output as below -

You might also like