Page 264 - PYTHON-12
P. 264
The above command, on execution, shall increment the value for all the rows of the field
Marks by 10 and shall display the Rollno, Name and Marks for all the students, increased
by 10.
Resultant table: student
Rollno Name Marks + 10
1. Raj Kumar 103
2. Deep Singh 108
3. Ankit Sharma 86
4. Radhika Gupta 88
5. Payal Goel 92
6. Diksha Sharma 90
7. Gurpreet Kaur 75
8. Akshay Dureja 100
9. Shreya Anand 80
10. Prateek Mittal 85
10 rows in a set (0.02 sec)
(b) Relational Operators
A relational (comparison) operator is a mathematical symbol which is used to compare two
values. It is used to compare two values of the same or compatible data types. Comparison
operators are used for conditions where two expressions are required to be compared
with each other, which results in either true or false. They are used with WHERE clause.
The following table describes different types of comparison operators in SQL:
OPERATOR DESCRIPTION
= Equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
<>, != Not equal to
For comparing character data type values, < means earlier in the alphabetical sequence
and > means later in the alphabetical sequence.
For example, mysql> SELECT Rollno, Name, Marks FROM student
marks either equal to or greater than 90.
WHERE Marks>=90;
Computer Science with Python–XII 12.34 Resultant table: student Marks
The above command shall display the Rollno, Name and Marks of all the students with
Rollno
Name
Raj Kumar
1.
93
98
2.
Deep Singh
90
Akshay Dureja
3.
3 rows in a set (0.02 sec)