SlideShare a Scribd company logo
* ABS(X) Returns the absolute value of X.  Mathematical Functions SELECT ABS(-32); 32 * CEIL(X) CEIL() is a synonym for CEILING().  SELECT CEILING(1.23); 2
* MOD() also works on values that have a fractional part and returns the exact remainder after division:  SELECT MOD(34.5,3); 1.5 * PI() Returns the value of π (pi). SELECT PI(); 3.141593
* POW(X,Y) Returns the value of X raised to the power of Y.  SELECT POW(2,2); 4 * SQRT(X) Returns the square root of a nonnegative number X.  SELECT SQRT(4); 2
* FLOOR(X) Returns the largest integer value not greater than X.  SELECT FLOOR(1.23); 1 * POWER(X,Y) This is a synonym for POW().
* COT(X) Returns the cotangent of X. SELECT COT(12); -1.5726734063977 * COS(X) Returns the cosine of X, where X is given in radians. SELECT COS(PI()); -1
ADDDATE(date,INTERVAL expr  unit), ADDDATE(expr,days) When invoked with the INTERVAL form of the second argument, ADDDATE() is a synonym for DATE_ADD(). The related function SUBDATE() is a synonym for DATE_SUB(). For information on the INTERVAL unit argument, see the discussion for DATE_ADD(). SELECT DATE_ADD('2008-01-02', INTERVAL 31 DAY); '2008-02-02' SELECT ADDDATE('2008-01-02', INTERVAL 31 DAY); '2008-02-02' Date and Time Functions
* CURDATE() Returns the current date as a value in 'YYYY-MM-DD'  SELECT CURDATE(); '2008-06-13' * CURTIME() Returns the current time as a value in 'HH:MM:SS' SELECT CURTIME(); '23:50:26'
* DATEDIFF(expr1,expr2) DATEDIFF() returns expr1 – expr2 expressed as a value in days from one date to the other. expr1 and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation. SELECT DATEDIFF('2007-12-31 23:59:59','2007-12-30'); 1
NOW()  Returns the current date and time as a value in 'YYYY-MM-DD HH:MM:SS' SELECT NOW(); '2007-12-15 23:50:26' SECOND(time)  Returns the second for time, in the range 0 to 59.  SELECT SECOND('10:05:03');
* YEAR(date)  Returns the year for date, in the range 1000 to 9999, or 0 for the “zero” date.  SELECT YEAR('1987-01-01'); 1987 * MINUTE(time)  Returns the minute for time, in the range 0 to 59.  SELECT MINUTE('2008-02-03 10:05:03'); 5
The Main Features of MySQL Internals and Portability:  Written in C and C++.  Tested with a broad range of different compilers.  Cross-platform support  Triggers  Cursors  Data Types:  Many data types: signed/unsigned integers 1, 2, 3, 4, and 8 bytes long, FLOAT, DOUBLE,  CHAR, VARCHAR, BINARY, VARBINARY, TEXT, BLOB, DATE, TIME, DATETIME, TIMESTAMP, YEAR, SET, ENUM True Varchar support
Statements and Functions:  Full operator and function support in the SELECT list and WHERE clause of queries. Full support for SQL GROUP BY and ORDER BY clauses. Support for group functions (COUNT(), AVG(), STD(), SUM(), MAX(), MIN(), and GROUP_CONCAT()).  Support for LEFT OUTER JOIN and RIGHT OUTER JOIN with both standard SQL and ODBC syntax.  Support for aliases on tables and columns as required by standard SQL.  Support for DELETE, INSERT, REPLACE, and UPDATE to return the number of rows that were changed (affected), or to return the number of rows matched instead by setting a flag when connecting to the server.  Security:  A privilege and password system that is very flexible and secure, and that allows host-based verification.  Password security by encryption of all password traffic when you connect to a server.
Scalability and Limits:  Support for large databases. We use MySQL Server with databases that contain 50 million records. We also know of users who use MySQL Server with 200,000 tables and about 5,000,000,000 rows.  Connectivity:  Clients can connect to MySQL Server using several protocols:  Clients can connect using TCP/IP sockets on any platform. MySQL client programs can be written in many languages. A client library written in C is available for clients written in C or C++.  APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are available, allowing MySQL clients to be written in many languages
Storage Engines MyISAM The default MySQL storage engine and the one that is used the most in Web, data warehousing, and other application environments.  InnoDB  A transaction-safe storage engine for MySQL that has commit, rollback, and crash-recovery capabilities to protect user data. InnoDB row-level locking (without escalation to coarser granularity locks) and Oracle-style consistent nonlocking reads increase multi-user concurrency and performance. InnoDB stores user data in clustered indexes to reduce I/O for common queries based on primary keys. To maintain data integrity, InnoDB also supports FOREIGN KEY referential-integrity constraints.
Memory  Stores all data in RAM for extremely fast access in environments that require quick lookups of reference and other like data.  CSV  The CSV storage engine stores data in text files using comma-separated values format.You can use the CSV engine to easily exchange data between other software and applications that can import and export in CSV format. Blackhole The  Blackhole storage engine accepts but does not store data and retrievals always return an empty set. The functionality can be used in distributed database design where data is automatically replicated, but not stored locally.

More Related Content

PDF
State of The Dolphin - May 2021
PDF
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
PDF
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
PDF
Les nouveautés de MySQL 8.0
PDF
MySQL Database Service Webinar: Installing Drupal in oci with mds
PDF
Les nouveautés de MySQL 8.0
PDF
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
PDF
MySQL Router REST API
State of The Dolphin - May 2021
FOSDEM 2022 MySQL Devroom: MySQL 8.0 - Logical Backups, Snapshots and Point-...
From single MySQL instance to High Availability: the journey to MySQL InnoDB ...
Les nouveautés de MySQL 8.0
MySQL Database Service Webinar: Installing Drupal in oci with mds
Les nouveautés de MySQL 8.0
Cloud native - Why to use MySQL 8.0 and how to use it on oci with MDS
MySQL Router REST API

What's hot (20)

PDF
MySQL Shell for DBAs
PDF
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
PDF
the State of the Dolphin - October 2020
PDF
Deploying Magento on OCI with MDS
PDF
MySQL Tech Café #8: MySQL 8.0 for Python Developers
PDF
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDS
PDF
MySQL Group Replication - Ready For Production? (2018-04)
PDF
MySQL Connectors 8.0.19 & DNS SRV
PDF
Open Source 101 2022 - MySQL Indexes and Histograms
PDF
MySQL Group Replication: Handling Network Glitches - Best Practices
PDF
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
DOCX
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
PDF
Long live to CMAN!
PDF
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
PDF
MySQL InnoDB Cluster - Advanced Configuration & Operations
PDF
Manual Tecnico OGG Oracle to MySQL
PDF
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
PDF
MySQL InnoDB Cluster and Group Replication in a Nutshell: hands-on tutorial
PDF
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
PDF
My sql 56_roadmap_april2012
MySQL Shell for DBAs
Oracle Developer Live: Deploying MySQL InnoDB Cluster on OCI with Terraform
the State of the Dolphin - October 2020
Deploying Magento on OCI with MDS
MySQL Tech Café #8: MySQL 8.0 for Python Developers
MySQL Database Service Webinar: Upgrading from on-premise MySQL to MDS
MySQL Group Replication - Ready For Production? (2018-04)
MySQL Connectors 8.0.19 & DNS SRV
Open Source 101 2022 - MySQL Indexes and Histograms
MySQL Group Replication: Handling Network Glitches - Best Practices
State of the Dolphin 2020 - 25th Anniversary of MySQL with 8.0.20
Oracle 12c RAC On your laptop Step by Step Implementation Guide 1.0
Long live to CMAN!
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
MySQL InnoDB Cluster - Advanced Configuration & Operations
Manual Tecnico OGG Oracle to MySQL
MySQL Group Replicatio in a nutshell - MySQL InnoDB Cluster
MySQL InnoDB Cluster and Group Replication in a Nutshell: hands-on tutorial
Another MySQL HA Solution for ProxySQL Users, Easy and All Integrated: MySQL ...
My sql 56_roadmap_april2012
Ad

Viewers also liked (9)

PPT
Ruby Installation
 
PPT
Mysql
 
DOC
V Pro Bp08505 Phase Iii Edited
 
KEY
Learning How To Use Jquery #3
PPT
Mysql Statments
 
PDF
Intel® V Pro™ Technology
 
PPT
AJAX ASP.Net
 
PDF
C++ plus data structures, 3rd edition (2003)
 
PPT
Perform brute force
 
Ruby Installation
 
Mysql
 
V Pro Bp08505 Phase Iii Edited
 
Learning How To Use Jquery #3
Mysql Statments
 
Intel® V Pro™ Technology
 
AJAX ASP.Net
 
C++ plus data structures, 3rd edition (2003)
 
Perform brute force
 
Ad

Similar to Mysql Fun (20)

PPT
Intro to tsql unit 10
PDF
PT- Oracle session01
DOCX
PPT
IP Mysql ppt.ppt111212121212121212121212
PPTX
Accelerating analytics on the Sensor and IoT Data.
PPT
Wk1to4
PPTX
Hardware Description Language
PPTX
unit 1 ppt.pptx
PPT
Sql Summit Clr, Service Broker And Xml
PPT
PO WER - Piotr Mariat - Sql
PPTX
unit 1_unit1_unit1_unit 1_unit1_unit1_ ppt.pptx
PPTX
unit 1_unit1_unit1_unit 1_unit1_unit1_ ppt.pptx
PPT
dbs class 7.ppt
DOCX
Pumps, Compressors and Turbine Fault Frequency Analysis
PDF
Pumps, Compressors and Turbine Fault Frequency Analysis
PPTX
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
PPTX
Verilog presentation final
PDF
DP080_Lecture_2 SQL related document.pdf
PPTX
MSAvMySQL.pptx
Intro to tsql unit 10
PT- Oracle session01
IP Mysql ppt.ppt111212121212121212121212
Accelerating analytics on the Sensor and IoT Data.
Wk1to4
Hardware Description Language
unit 1 ppt.pptx
Sql Summit Clr, Service Broker And Xml
PO WER - Piotr Mariat - Sql
unit 1_unit1_unit1_unit 1_unit1_unit1_ ppt.pptx
unit 1_unit1_unit1_unit 1_unit1_unit1_ ppt.pptx
dbs class 7.ppt
Pumps, Compressors and Turbine Fault Frequency Analysis
Pumps, Compressors and Turbine Fault Frequency Analysis
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
Verilog presentation final
DP080_Lecture_2 SQL related document.pdf
MSAvMySQL.pptx

More from SHC (14)

PDF
Inside Asp.Net Web Matrix
 
PDF
V Pro Bp08505 Phase Iii Edited
 
DOC
V Pro Bp08505 Phase Ii Edited
 
PPT
XForms with Linux
 
PPT
XForms
 
PPT
Rails
 
PPT
Call
 
PPTX
Action Mailer
 
PPT
Ruby Security
 
PPTX
Web Services
 
PDF
Pragmatic Agile Web Development With Rails.3rd Edition.2009
 
PPT
Ruby Basics
 
PPT
MySQL Built-In Functions
 
PPT
Mobile Computing
 
Inside Asp.Net Web Matrix
 
V Pro Bp08505 Phase Iii Edited
 
V Pro Bp08505 Phase Ii Edited
 
XForms with Linux
 
XForms
 
Rails
 
Call
 
Action Mailer
 
Ruby Security
 
Web Services
 
Pragmatic Agile Web Development With Rails.3rd Edition.2009
 
Ruby Basics
 
MySQL Built-In Functions
 
Mobile Computing
 

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
A Presentation on Artificial Intelligence
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
cuic standard and advanced reporting.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Getting Started with Data Integration: FME Form 101
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Programs and apps: productivity, graphics, security and other tools
Assigned Numbers - 2025 - Bluetooth® Document
Encapsulation_ Review paper, used for researhc scholars
SOPHOS-XG Firewall Administrator PPT.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Tartificialntelligence_presentation.pptx
MIND Revenue Release Quarter 2 2025 Press Release
A comparative analysis of optical character recognition models for extracting...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
A Presentation on Artificial Intelligence
Accuracy of neural networks in brain wave diagnosis of schizophrenia
cuic standard and advanced reporting.pdf
Empathic Computing: Creating Shared Understanding
Getting Started with Data Integration: FME Form 101
The Rise and Fall of 3GPP – Time for a Sabbatical?
Digital-Transformation-Roadmap-for-Companies.pptx

Mysql Fun

  • 1. * ABS(X) Returns the absolute value of X. Mathematical Functions SELECT ABS(-32); 32 * CEIL(X) CEIL() is a synonym for CEILING(). SELECT CEILING(1.23); 2
  • 2. * MOD() also works on values that have a fractional part and returns the exact remainder after division: SELECT MOD(34.5,3); 1.5 * PI() Returns the value of π (pi). SELECT PI(); 3.141593
  • 3. * POW(X,Y) Returns the value of X raised to the power of Y. SELECT POW(2,2); 4 * SQRT(X) Returns the square root of a nonnegative number X. SELECT SQRT(4); 2
  • 4. * FLOOR(X) Returns the largest integer value not greater than X. SELECT FLOOR(1.23); 1 * POWER(X,Y) This is a synonym for POW().
  • 5. * COT(X) Returns the cotangent of X. SELECT COT(12); -1.5726734063977 * COS(X) Returns the cosine of X, where X is given in radians. SELECT COS(PI()); -1
  • 6. ADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days) When invoked with the INTERVAL form of the second argument, ADDDATE() is a synonym for DATE_ADD(). The related function SUBDATE() is a synonym for DATE_SUB(). For information on the INTERVAL unit argument, see the discussion for DATE_ADD(). SELECT DATE_ADD('2008-01-02', INTERVAL 31 DAY); '2008-02-02' SELECT ADDDATE('2008-01-02', INTERVAL 31 DAY); '2008-02-02' Date and Time Functions
  • 7. * CURDATE() Returns the current date as a value in 'YYYY-MM-DD' SELECT CURDATE(); '2008-06-13' * CURTIME() Returns the current time as a value in 'HH:MM:SS' SELECT CURTIME(); '23:50:26'
  • 8. * DATEDIFF(expr1,expr2) DATEDIFF() returns expr1 – expr2 expressed as a value in days from one date to the other. expr1 and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation. SELECT DATEDIFF('2007-12-31 23:59:59','2007-12-30'); 1
  • 9. NOW() Returns the current date and time as a value in 'YYYY-MM-DD HH:MM:SS' SELECT NOW(); '2007-12-15 23:50:26' SECOND(time) Returns the second for time, in the range 0 to 59. SELECT SECOND('10:05:03');
  • 10. * YEAR(date) Returns the year for date, in the range 1000 to 9999, or 0 for the “zero” date. SELECT YEAR('1987-01-01'); 1987 * MINUTE(time) Returns the minute for time, in the range 0 to 59. SELECT MINUTE('2008-02-03 10:05:03'); 5
  • 11. The Main Features of MySQL Internals and Portability: Written in C and C++. Tested with a broad range of different compilers. Cross-platform support Triggers Cursors Data Types: Many data types: signed/unsigned integers 1, 2, 3, 4, and 8 bytes long, FLOAT, DOUBLE, CHAR, VARCHAR, BINARY, VARBINARY, TEXT, BLOB, DATE, TIME, DATETIME, TIMESTAMP, YEAR, SET, ENUM True Varchar support
  • 12. Statements and Functions: Full operator and function support in the SELECT list and WHERE clause of queries. Full support for SQL GROUP BY and ORDER BY clauses. Support for group functions (COUNT(), AVG(), STD(), SUM(), MAX(), MIN(), and GROUP_CONCAT()). Support for LEFT OUTER JOIN and RIGHT OUTER JOIN with both standard SQL and ODBC syntax. Support for aliases on tables and columns as required by standard SQL. Support for DELETE, INSERT, REPLACE, and UPDATE to return the number of rows that were changed (affected), or to return the number of rows matched instead by setting a flag when connecting to the server. Security: A privilege and password system that is very flexible and secure, and that allows host-based verification. Password security by encryption of all password traffic when you connect to a server.
  • 13. Scalability and Limits: Support for large databases. We use MySQL Server with databases that contain 50 million records. We also know of users who use MySQL Server with 200,000 tables and about 5,000,000,000 rows. Connectivity: Clients can connect to MySQL Server using several protocols: Clients can connect using TCP/IP sockets on any platform. MySQL client programs can be written in many languages. A client library written in C is available for clients written in C or C++. APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are available, allowing MySQL clients to be written in many languages
  • 14. Storage Engines MyISAM The default MySQL storage engine and the one that is used the most in Web, data warehousing, and other application environments. InnoDB A transaction-safe storage engine for MySQL that has commit, rollback, and crash-recovery capabilities to protect user data. InnoDB row-level locking (without escalation to coarser granularity locks) and Oracle-style consistent nonlocking reads increase multi-user concurrency and performance. InnoDB stores user data in clustered indexes to reduce I/O for common queries based on primary keys. To maintain data integrity, InnoDB also supports FOREIGN KEY referential-integrity constraints.
  • 15. Memory Stores all data in RAM for extremely fast access in environments that require quick lookups of reference and other like data. CSV The CSV storage engine stores data in text files using comma-separated values format.You can use the CSV engine to easily exchange data between other software and applications that can import and export in CSV format. Blackhole The Blackhole storage engine accepts but does not store data and retrievals always return an empty set. The functionality can be used in distributed database design where data is automatically replicated, but not stored locally.