0% found this document useful (0 votes)
6 views6 pages

DBMS Lab 06 - 21-CP-055

This lab report focuses on SQL wildcards and operators through practical tasks involving two tables: 'Customers' and 'Products'. It includes specific SQL queries to filter data based on various conditions such as country, contact name, city patterns, and product prices. The report is structured to guide the creation of tables and the execution of SQL statements for data selection.

Uploaded by

shapparhay
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)
6 views6 pages

DBMS Lab 06 - 21-CP-055

This lab report focuses on SQL wildcards and operators through practical tasks involving two tables: 'Customers' and 'Products'. It includes specific SQL queries to filter data based on various conditions such as country, contact name, city patterns, and product prices. The report is structured to guide the creation of tables and the execution of SQL statements for data selection.

Uploaded by

shapparhay
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/ 6

University of

ENGINEERING & TECHNOLOGY


TAXILA

DATABASE
MANAGEMENT
SYSTEM

LAB REPORT # 06

Submitted By:
Minal Fatima 21-CP-55
SQL WILDCARDS & OPERATORS

Lab Tasks:

1: Consider the following table “Customers”.

Query to Create Table:

Create the above table and do the following.


a) Write an SQL statement that selects all Customers with a Country starting with the letter “s”.
b) Write an SQL statement that selects all Customers with a Contact Name ending with the letter
“s”.
c) Write an SQL statement that selects all Customers with a City containing the pattern “ndo”.
d) Write an SQL statement that selects all Customers with a City not containing the pattern “ndo”.
e) Write an SQL statement that selects the two first Customers from table who belong
to“Germany” or “Sweden”.
f) Write an SQL statement that selects all Customers with a City of "Paris" or "London" without
using ‘OR’ operator.
Results:

a)

b)

c)

d)
e)

f)
2. Consider the following table “Products”

Query to Create Table:

Create the above table and do the following.

a) Write an SQL statement that selects all products with a price from 10 to 20.
b) Write an SQL statement that selects all products with a price from 20 to 30.
c) Write an SQL statement that selects all products with a price from 10 to 22 but products with a
CategoryIDof 1,2, or 3 should not be displayed.
d) Write an SQL statement that selects all products with a ProductName beginning with any of the
letter not between 'C' and 'M'.
a)

b)

c)

d)

You might also like