1
q
Dr. Amany AbdElSamea Saeed
PEARSON BTEC International Standards Verifier
ICT Program
Lec. 5 MySQL-Constraints and User Management Privileges
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
03/15/2025 08:51 PM
2
Outline
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
MySQL Functions
Aggregate Functions
String Functions
Control Functions
Numeric Functions
Date and Time Functions
03/15/2025 08:51 PM
03/15/2025 08:51 PM 3
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
MySQL Functions
• Basically, it is a set of SQL statements that accept only input parameters, perform actions
and return the result. A function can return only a single value or a table
• Types of Function
– A scalar function is a function that operates on scalar values -- that is, it takes one (or
more) input values as arguments directly and returns a value.
– An aggregate function is a function that operates on aggregate data -- that is, it takes a
complete set of data as input and returns a value that is computed from all the values in
the set. E.g. max(), min(), count(), sum(), avg().
– Control Functions allow us a degree of conditionality when returning result sets
03/15/2025 08:51 PM 4
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
MySQL Aggregate Functions
• An aggregate function performs a calculation on multiple values and returns a single value.
• We mostly use the aggregate functions with SELECT statements in the data query
languages.
• The following are the aggregate functions:
• AVG() - Returns the average of the non-NULL values in the specified field.
• SUM() - Returns the sum of the non-NULL values in the specified field.
• MIN() - Returns the minimum of the non-NULL values in the specified field.
• MAX() - Returns the maximum of the non-NULL values in the specified field.
• COUNT() - Returns the number of rows containing non-NULL values in the specified field.
03/15/2025 08:51 PM 5
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Count()
• The COUNT() function returns the number of rows that matches a specified criterion.
COUNT() Syntax:
• aggregate_expression: It specifies the column or expression whose NON-NULL values will
be counted
03/15/2025 08:51 PM 6
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
Calculates the total number of employees name available in the table:
03/15/2025 08:51 PM 7
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
Execute the following statement that returns all rows from the employee table and
WHERE clause specifies the rows whose value in the column emp_age is greater than 32
This statement uses the COUNT(distinct expression) function that counts the Non-Null and
distinct rows in the column emp_age:
03/15/2025 08:51 PM 8
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Sum()
• The SUM() function returns the total sum of a numeric column.
SUM() Syntax
03/15/2025 08:51 PM 9
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
Execute the following query that calculates the total number of working hours of all employees
03/15/2025 08:51 PM 10
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
MySQL sum() function with WHERE clause
03/15/2025 08:51 PM 11
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
AVG()
• The AVG() function returns the average value of a numeric column.
AVG() Syntax
03/15/2025 08:51 PM 12
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
mysql> SELECT AVG(working_hours) AS Avg_working_hours FROM employees;
03/15/2025 08:51 PM 13
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
mysql> SELECT AVG(working_hours) AS
Avg_working_hours FROM employees WHERE working_hours>=12;
mysql> SELECT emp_name, occupation, AVG(working_hours) AS
Avg_working_hours FROM employees GROUP BY occupation;
03/15/2025 08:51 PM 14
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
MIN() and MAX()
• The MIN() function returns the smallest value of the selected column.
• The MAX() function returns the largest value of the selected column.
MIN() Syntax
MAX() Syntax
03/15/2025 08:51 PM 15
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
03/15/2025 08:51 PM 16
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
03/15/2025 08:51 PM 17
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Control Functions
The control functions that allow us a degree of conditionality
when returning result sets
03/15/2025 08:51 PM 18
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
IF() Function
The IF function returns a value YES when the given condition evaluates to
true and returns a NO value when the condition evaluates to false
03/15/2025 08:51 PM 19
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
03/15/2025 08:51 PM 20
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
03/15/2025 08:51 PM 21
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
IFNULL() Function
03/15/2025 08:51 PM 22
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
03/15/2025 08:51 PM 23
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
03/15/2025 08:51 PM 24
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
NULLIF()
03/15/2025 08:51 PM 25
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
03/15/2025 08:51 PM 26
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
CASE Expression
03/15/2025 08:51 PM 27
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
03/15/2025 08:51 PM 28
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
String Function
• String values can be explained as “bits of text”. The string functions
allow us to manipulate these values before they are displayed.
• Adding text to an existing value
• Changing part of a string
• Extracting text from a string
• Finding a piece of text in string
03/15/2025 08:51 PM 29
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
CONCAT()
• Adding text to an existing value
03/15/2025 08:51 PM 30
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
REPLACE
• Changing Part of a String
03/15/2025 08:51 PM 31
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Insert()
03/15/2025 08:51 PM 32
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
LEFT(), RIGHT(), and MID()
• Extracting text from a string
03/15/2025 08:51 PM 33
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
03/15/2025 08:51 PM 34
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
SUBSTRING
03/15/2025 08:51 PM 35
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
LOCATE()
• Finding a piece of text in a string
03/15/2025 08:51 PM 36
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
LENGTH()
03/15/2025 08:51 PM 37
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
LCASE() and UCASE()
• Transforming strings
03/15/2025 08:51 PM 38
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
REVERSE
03/15/2025 08:51 PM 39
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Numeric Functions
03/15/2025 08:51 PM 40
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
FLOOR()
03/15/2025 08:51 PM 41
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
CEILING()
03/15/2025 08:51 PM 42
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
ROUND()
03/15/2025 08:51 PM 43
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
TRUNCATE
03/15/2025 08:51 PM 44
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Date and Time Functions
NOW(), CURTIME() and CURDATE()
03/15/2025 08:51 PM 45
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
DATE_ADD() and DATE_SUB()
03/15/2025 08:51 PM 46
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
Example
03/15/2025 08:51 PM 47
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬
User Defined Function
• MYSQL also supports user defined functions that extend MYSQL.
• User define functions are functions that you can create using a
programming language such as C, C++ etc., and then add them to MYSQL
server.
• Once added, they can be used just like any other function.
03/15/2025 08:51 PM 48
q
Thank you
‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬
‫والطاقة‬

More Related Content

PDF
SQL Functions and Operators
PDF
xii-ip-support-material.pdf
PPTX
Data Base Management Slides SQL with example
PDF
Fuzzy System Approach for TCSC Based Controller Design
PPTX
Presentación Oracle Database Migración consideraciones 10g/11g/12c
PPT
Standard Query Language (SQL), Single Row Function.ppt
PDF
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
PPT
3.1- Data Management & Retrieval using data analytics techniques
SQL Functions and Operators
xii-ip-support-material.pdf
Data Base Management Slides SQL with example
Fuzzy System Approach for TCSC Based Controller Design
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Standard Query Language (SQL), Single Row Function.ppt
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
3.1- Data Management & Retrieval using data analytics techniques

Similar to NCTU ppt 2023-2024_WEEK4-MySQL-Built-In-Functions.pptx (20)

PDF
Study of model predictive control using ni lab view
PDF
Study of model predictive control using ni lab view
PDF
Study of model predictive control using ni lab view
PPTX
Oracle Database 12c - Data Redaction
PDF
SQL Macros - Game Changing Feature for SQL Developers?
PDF
A Comparative Analysis on Parameters of Different Adder Topologies
PDF
Balancing the line by using heuristic method based on cpm in salbp –a case study
PDF
How to analyze and tune sql queries for better performance webinar
PDF
Sql wksht-3
PDF
Advanced plsql mock_assessment
PPTX
MYSQL using set operators
PPTX
3130703_DBMS_GTU_Study_Material_Presentations_Unit-10_17102019083650AM.pptx
PPTX
Sql FUNCTIONS
PDF
Dhana Raj Markandu: Maximising Generator Connections in Distributed Networks ...
PDF
AN EXPERIMENTAL STUDY ON THE AUTOMOTIVE PRODUCTION LINE USING ASSEMBLY LINE B...
PDF
Database Management System lecture note.
PDF
Time-Based Blind SQL Injection Using Heavy Queries
PDF
Low cost high-performance vlsi architecture for montgomery modular multiplica...
PDF
Ge aviation spark application experience porting analytics into py spark ml p...
PDF
NCTU ppt 2023-2024_WEEK3-DataTypes-Clauses-Operators.pdf
Study of model predictive control using ni lab view
Study of model predictive control using ni lab view
Study of model predictive control using ni lab view
Oracle Database 12c - Data Redaction
SQL Macros - Game Changing Feature for SQL Developers?
A Comparative Analysis on Parameters of Different Adder Topologies
Balancing the line by using heuristic method based on cpm in salbp –a case study
How to analyze and tune sql queries for better performance webinar
Sql wksht-3
Advanced plsql mock_assessment
MYSQL using set operators
3130703_DBMS_GTU_Study_Material_Presentations_Unit-10_17102019083650AM.pptx
Sql FUNCTIONS
Dhana Raj Markandu: Maximising Generator Connections in Distributed Networks ...
AN EXPERIMENTAL STUDY ON THE AUTOMOTIVE PRODUCTION LINE USING ASSEMBLY LINE B...
Database Management System lecture note.
Time-Based Blind SQL Injection Using Heavy Queries
Low cost high-performance vlsi architecture for montgomery modular multiplica...
Ge aviation spark application experience porting analytics into py spark ml p...
NCTU ppt 2023-2024_WEEK3-DataTypes-Clauses-Operators.pdf
Ad

Recently uploaded (20)

PDF
Applications of Equal_Area_Criterion.pdf
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PPTX
Measurement Uncertainty and Measurement System analysis
PPTX
Module 8- Technological and Communication Skills.pptx
PDF
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
PPTX
ai_satellite_crop_management_20250815030350.pptx
PPTX
wireless networks, mobile computing.pptx
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PDF
Implantable Drug Delivery System_NDDS_BPHARMACY__SEM VII_PCI .pdf
PDF
Design Guidelines and solutions for Plastics parts
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PDF
Java Basics-Introduction and program control
PDF
LOW POWER CLASS AB SI POWER AMPLIFIER FOR WIRELESS MEDICAL SENSOR NETWORK
PPTX
Principal presentation for NAAC (1).pptx
PDF
Abrasive, erosive and cavitation wear.pdf
PPTX
CyberSecurity Mobile and Wireless Devices
PPTX
Amdahl’s law is explained in the above power point presentations
PPTX
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
Applications of Equal_Area_Criterion.pdf
August -2025_Top10 Read_Articles_ijait.pdf
Measurement Uncertainty and Measurement System analysis
Module 8- Technological and Communication Skills.pptx
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
Soil Improvement Techniques Note - Rabbi
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
ai_satellite_crop_management_20250815030350.pptx
wireless networks, mobile computing.pptx
Exploratory_Data_Analysis_Fundamentals.pdf
Implantable Drug Delivery System_NDDS_BPHARMACY__SEM VII_PCI .pdf
Design Guidelines and solutions for Plastics parts
distributed database system" (DDBS) is often used to refer to both the distri...
Java Basics-Introduction and program control
LOW POWER CLASS AB SI POWER AMPLIFIER FOR WIRELESS MEDICAL SENSOR NETWORK
Principal presentation for NAAC (1).pptx
Abrasive, erosive and cavitation wear.pdf
CyberSecurity Mobile and Wireless Devices
Amdahl’s law is explained in the above power point presentations
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
Ad

NCTU ppt 2023-2024_WEEK4-MySQL-Built-In-Functions.pptx

  • 1. 1 q Dr. Amany AbdElSamea Saeed PEARSON BTEC International Standards Verifier ICT Program Lec. 5 MySQL-Constraints and User Management Privileges ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ 03/15/2025 08:51 PM
  • 2. 2 Outline ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ MySQL Functions Aggregate Functions String Functions Control Functions Numeric Functions Date and Time Functions 03/15/2025 08:51 PM
  • 3. 03/15/2025 08:51 PM 3 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ MySQL Functions • Basically, it is a set of SQL statements that accept only input parameters, perform actions and return the result. A function can return only a single value or a table • Types of Function – A scalar function is a function that operates on scalar values -- that is, it takes one (or more) input values as arguments directly and returns a value. – An aggregate function is a function that operates on aggregate data -- that is, it takes a complete set of data as input and returns a value that is computed from all the values in the set. E.g. max(), min(), count(), sum(), avg(). – Control Functions allow us a degree of conditionality when returning result sets
  • 4. 03/15/2025 08:51 PM 4 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ MySQL Aggregate Functions • An aggregate function performs a calculation on multiple values and returns a single value. • We mostly use the aggregate functions with SELECT statements in the data query languages. • The following are the aggregate functions: • AVG() - Returns the average of the non-NULL values in the specified field. • SUM() - Returns the sum of the non-NULL values in the specified field. • MIN() - Returns the minimum of the non-NULL values in the specified field. • MAX() - Returns the maximum of the non-NULL values in the specified field. • COUNT() - Returns the number of rows containing non-NULL values in the specified field.
  • 5. 03/15/2025 08:51 PM 5 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Count() • The COUNT() function returns the number of rows that matches a specified criterion. COUNT() Syntax: • aggregate_expression: It specifies the column or expression whose NON-NULL values will be counted
  • 6. 03/15/2025 08:51 PM 6 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example Calculates the total number of employees name available in the table:
  • 7. 03/15/2025 08:51 PM 7 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example Execute the following statement that returns all rows from the employee table and WHERE clause specifies the rows whose value in the column emp_age is greater than 32 This statement uses the COUNT(distinct expression) function that counts the Non-Null and distinct rows in the column emp_age:
  • 8. 03/15/2025 08:51 PM 8 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Sum() • The SUM() function returns the total sum of a numeric column. SUM() Syntax
  • 9. 03/15/2025 08:51 PM 9 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example Execute the following query that calculates the total number of working hours of all employees
  • 10. 03/15/2025 08:51 PM 10 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example MySQL sum() function with WHERE clause
  • 11. 03/15/2025 08:51 PM 11 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ AVG() • The AVG() function returns the average value of a numeric column. AVG() Syntax
  • 12. 03/15/2025 08:51 PM 12 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example mysql> SELECT AVG(working_hours) AS Avg_working_hours FROM employees;
  • 13. 03/15/2025 08:51 PM 13 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example mysql> SELECT AVG(working_hours) AS Avg_working_hours FROM employees WHERE working_hours>=12; mysql> SELECT emp_name, occupation, AVG(working_hours) AS Avg_working_hours FROM employees GROUP BY occupation;
  • 14. 03/15/2025 08:51 PM 14 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ MIN() and MAX() • The MIN() function returns the smallest value of the selected column. • The MAX() function returns the largest value of the selected column. MIN() Syntax MAX() Syntax
  • 15. 03/15/2025 08:51 PM 15 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example
  • 16. 03/15/2025 08:51 PM 16 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example
  • 17. 03/15/2025 08:51 PM 17 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Control Functions The control functions that allow us a degree of conditionality when returning result sets
  • 18. 03/15/2025 08:51 PM 18 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ IF() Function The IF function returns a value YES when the given condition evaluates to true and returns a NO value when the condition evaluates to false
  • 19. 03/15/2025 08:51 PM 19 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example
  • 20. 03/15/2025 08:51 PM 20 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example
  • 21. 03/15/2025 08:51 PM 21 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ IFNULL() Function
  • 22. 03/15/2025 08:51 PM 22 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example
  • 23. 03/15/2025 08:51 PM 23 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example
  • 24. 03/15/2025 08:51 PM 24 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ NULLIF()
  • 25. 03/15/2025 08:51 PM 25 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example
  • 26. 03/15/2025 08:51 PM 26 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ CASE Expression
  • 27. 03/15/2025 08:51 PM 27 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example
  • 28. 03/15/2025 08:51 PM 28 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ String Function • String values can be explained as “bits of text”. The string functions allow us to manipulate these values before they are displayed. • Adding text to an existing value • Changing part of a string • Extracting text from a string • Finding a piece of text in string
  • 29. 03/15/2025 08:51 PM 29 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ CONCAT() • Adding text to an existing value
  • 30. 03/15/2025 08:51 PM 30 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ REPLACE • Changing Part of a String
  • 31. 03/15/2025 08:51 PM 31 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Insert()
  • 32. 03/15/2025 08:51 PM 32 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ LEFT(), RIGHT(), and MID() • Extracting text from a string
  • 33. 03/15/2025 08:51 PM 33 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example
  • 34. 03/15/2025 08:51 PM 34 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ SUBSTRING
  • 35. 03/15/2025 08:51 PM 35 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ LOCATE() • Finding a piece of text in a string
  • 36. 03/15/2025 08:51 PM 36 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ LENGTH()
  • 37. 03/15/2025 08:51 PM 37 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ LCASE() and UCASE() • Transforming strings
  • 38. 03/15/2025 08:51 PM 38 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ REVERSE
  • 39. 03/15/2025 08:51 PM 39 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Numeric Functions
  • 40. 03/15/2025 08:51 PM 40 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ FLOOR()
  • 41. 03/15/2025 08:51 PM 41 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ CEILING()
  • 42. 03/15/2025 08:51 PM 42 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ ROUND()
  • 43. 03/15/2025 08:51 PM 43 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ TRUNCATE
  • 44. 03/15/2025 08:51 PM 44 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Date and Time Functions NOW(), CURTIME() and CURDATE()
  • 45. 03/15/2025 08:51 PM 45 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ DATE_ADD() and DATE_SUB()
  • 46. 03/15/2025 08:51 PM 46 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ Example
  • 47. 03/15/2025 08:51 PM 47 ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬ User Defined Function • MYSQL also supports user defined functions that extend MYSQL. • User define functions are functions that you can create using a programming language such as C, C++ etc., and then add them to MYSQL server. • Once added, they can be used just like any other function.
  • 48. 03/15/2025 08:51 PM 48 q Thank you ‫الصناعة‬ ‫تكنولوجيا‬ ‫كلية‬ ‫والطاقة‬