Querying and Filtering Data in Mysql Table (Extended)
Querying and Filtering Data in Mysql Table (Extended)
• Using MySQL ORDER BY and DESC to get the Descending Order salary
• Using MySQL ORDER BY and ASC to get the Ascending Order salary
Between, Not Between In, Not In
• MySQL IN examples Like OR operator
The CAST() function converts a value of any type into a value that has a specified type.
The target type can be any one of the following types:
BINARY, CHAR, DATE, DATETIME, TIME,DECIMAL, SIGNED, UNSIGNED .
Date Format
%Y Year as a numeric, 4-digit
value
%y Year as a numeric, 2-digit
value
• Find employees name who has first name ending with ‘r’
• select * from students where FirstName like '_u%'
• Example-2
• Finds any values that start with “m" and are at least 3 characters in length
• select * from students where FirstName like 'm__%'
• MySQL LIKE operator with NOT operator
• Example-1:
• select * from students where FirstName not like 'm__%'
• Example-2
• Checking NULL values