{"id":383,"date":"2024-10-16T06:43:53","date_gmt":"2024-10-16T06:43:53","guid":{"rendered":"https:\/\/itxperts.co.in\/blog\/?p=383"},"modified":"2024-10-27T10:48:41","modified_gmt":"2024-10-27T10:48:41","slug":"all-numeric-functions-in-mysql-with-examples","status":"publish","type":"post","link":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/","title":{"rendered":"MySQL Numeric Functions"},"content":{"rendered":"\n<p>MySQL provides a rich set of numeric functions that allow you to perform various mathematical operations and manipulations on numerical data. These functions are useful when working with calculations, statistical analysis, and data transformations in your MySQL databases. In this blog post, we\u2019ll explore all the important numeric functions in MySQL, along with examples to help you understand how to use them effectively.<\/p>\n\n\n\n<p>By <strong>ITXperts<\/strong> <\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Table of Contents<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>ABS()<\/strong><\/li>\n\n\n\n<li><strong>CEIL() \/ CEILING()<\/strong><\/li>\n\n\n\n<li><strong>FLOOR()<\/strong><\/li>\n\n\n\n<li><strong>ROUND()<\/strong><\/li>\n\n\n\n<li><strong>TRUNCATE()<\/strong><\/li>\n\n\n\n<li><strong>MOD()<\/strong><\/li>\n\n\n\n<li><strong>POWER()<\/strong><\/li>\n\n\n\n<li><strong>SQRT()<\/strong><\/li>\n\n\n\n<li><strong>LOG()<\/strong><\/li>\n\n\n\n<li><strong>EXP()<\/strong><\/li>\n\n\n\n<li><strong>PI()<\/strong><\/li>\n\n\n\n<li><strong>SIN(), COS(), TAN()<\/strong><\/li>\n\n\n\n<li><strong>SIGN()<\/strong><\/li>\n\n\n\n<li><strong>RAND()<\/strong><\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>ABS()<\/strong> &#8211; Absolute Value<\/h3>\n\n\n\n<p>The <code>ABS()<\/code> function returns the absolute (non-negative) value of a number.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT ABS(number);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT ABS(-15); -- Returns 15<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>CEIL() \/ CEILING()<\/strong> &#8211; Round Up<\/h3>\n\n\n\n<p><code>CEIL()<\/code> (or <code>CEILING()<\/code>) rounds a number up to the nearest integer.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT CEIL(number);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT CEIL(4.3); -- Returns 5\nSELECT CEIL(-4.8); -- Returns -4<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>FLOOR()<\/strong> &#8211; Round Down<\/h3>\n\n\n\n<p><code>FLOOR()<\/code> rounds a number down to the nearest integer.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT FLOOR(number);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT FLOOR(7.8); -- Returns 7\nSELECT FLOOR(-3.2); -- Returns -4<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>ROUND()<\/strong> &#8211; Round to Nearest Value<\/h3>\n\n\n\n<p><code>ROUND()<\/code> rounds a number to a specified number of decimal places. You can also use it to round to the nearest integer.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT ROUND(number, decimal_places);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT ROUND(3.14159, 2); -- Returns 3.14\nSELECT ROUND(123.456, 0); -- Returns 123<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">5. <strong>TRUNCATE()<\/strong> &#8211; Truncate to Decimal Places<\/h3>\n\n\n\n<p><code>TRUNCATE()<\/code> truncates a number to a specified number of decimal places without rounding.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT TRUNCATE(number, decimal_places);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT TRUNCATE(3.14159, 2); -- Returns 3.14\nSELECT TRUNCATE(123.456, 0); -- Returns 123<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">6. <strong>MOD()<\/strong> &#8211; Modulus (Remainder)<\/h3>\n\n\n\n<p><code>MOD()<\/code> returns the remainder of a division operation.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT MOD(dividend, divisor);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT MOD(10, 3); -- Returns 1\nSELECT MOD(17, 4); -- Returns 1<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">7. <strong>POWER()<\/strong> &#8211; Exponentiation<\/h3>\n\n\n\n<p><code>POWER()<\/code> raises a number to a specified power.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT POWER(number, exponent);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT POWER(2, 3); -- Returns 8 (2 raised to the power of 3)\nSELECT POWER(5, 2); -- Returns 25<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">8. <strong>SQRT()<\/strong> &#8211; Square Root<\/h3>\n\n\n\n<p><code>SQRT()<\/code> returns the square root of a number.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT SQRT(number);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT SQRT(16); -- Returns 4\nSELECT SQRT(81); -- Returns 9<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">9. <strong>LOG()<\/strong> &#8211; Natural Logarithm<\/h3>\n\n\n\n<p><code>LOG()<\/code> returns the natural logarithm (base <code>e<\/code>) of a number. You can also specify a different base for the logarithm.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT LOG(number);\nSELECT LOG(base, number);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT LOG(2.718281828); -- Returns 1 (natural log of e)\nSELECT LOG(10, 100); -- Returns 2 (log base 10 of 100)<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">10. <strong>EXP()<\/strong> &#8211; Exponential Function<\/h3>\n\n\n\n<p><code>EXP()<\/code> returns <code>e<\/code> raised to the power of the given number.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT EXP(number);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT EXP(1); -- Returns 2.718281828 (e^1)\nSELECT EXP(2); -- Returns 7.389056099 (e^2)<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">11. <strong>PI()<\/strong> &#8211; Value of Pi<\/h3>\n\n\n\n<p><code>PI()<\/code> returns the value of Pi (<code>\u03c0<\/code>), which is approximately <code>3.141593<\/code>.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT PI();<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT PI(); -- Returns 3.141593<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">12. <strong>SIN(), COS(), TAN()<\/strong> &#8211; Trigonometric Functions<\/h3>\n\n\n\n<p>MySQL provides basic trigonometric functions like <code>SIN()<\/code> (sine), <code>COS()<\/code> (cosine), and <code>TAN()<\/code> (tangent).<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT SIN(number);\nSELECT COS(number);\nSELECT TAN(number);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT SIN(PI()\/2); -- Returns 1 (sine of 90 degrees)\nSELECT COS(PI()); -- Returns -1 (cosine of 180 degrees)\nSELECT TAN(0); -- Returns 0 (tangent of 0 degrees)<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">13. <strong>SIGN()<\/strong> &#8211; Sign of a Number<\/h3>\n\n\n\n<p><code>SIGN()<\/code> returns the sign of a number as <code>-1<\/code>, <code>0<\/code>, or <code>1<\/code>, depending on whether the number is negative, zero, or positive.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT SIGN(number);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT SIGN(-10); -- Returns -1\nSELECT SIGN(0); -- Returns 0\nSELECT SIGN(25); -- Returns 1<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">14. <strong>RAND()<\/strong> &#8211; Generate a Random Number<\/h3>\n\n\n\n<p><code>RAND()<\/code> generates a random floating-point number between 0 and 1. Optionally, you can provide a seed for repeatable random values.<\/p>\n\n\n\n<p><strong>Syntax:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT RAND();\nSELECT RAND(seed);<\/code><\/pre>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql line-numbers\">SELECT RAND(); -- Returns a random number (e.g., 0.3456)\nSELECT RAND(100); -- Returns the same random number every time when using the same seed<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>These are the most commonly used numeric functions in MySQL. Each of these functions serves a different purpose, whether it\u2019s rounding numbers, performing trigonometric calculations, generating random numbers, or calculating powers and logarithms. Mastering these functions will help you work efficiently with numerical data in MySQL.<\/p>\n\n\n\n<p>For more advanced use cases or if you have any questions, feel free to reach out to us at <strong>ITXperts<\/strong>. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog post, we explore the essential numeric functions in MySQL, such as ABS(), CEIL(), FLOOR(), ROUND(), and MOD(). Each function is explained with examples to help you perform mathematical operations efficiently in your databases. Whether you&#8217;re rounding numbers, calculating remainders, or generating random values, these functions will simplify your data manipulation tasks. Perfect for developers and database administrators looking to enhance their MySQL skills! Written by ITXperts<\/p>\n","protected":false},"author":1,"featured_media":384,"comment_status":"open","ping_status":"open","sticky":false,"template":"custom-post-with-sidebar.php","format":"standard","meta":{"_acf_changed":false,"googlesitekit_rrm_CAow44u0DA:productID":"","footnotes":""},"categories":[159],"tags":[],"class_list":["post-383","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learn-mysql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MySQL Numeric Functions - Itxperts<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MySQL Numeric Functions - Itxperts\" \/>\n<meta property=\"og:description\" content=\"In this blog post, we explore the essential numeric functions in MySQL, such as ABS(), CEIL(), FLOOR(), ROUND(), and MOD(). Each function is explained with examples to help you perform mathematical operations efficiently in your databases. Whether you&#039;re rounding numbers, calculating remainders, or generating random values, these functions will simplify your data manipulation tasks. Perfect for developers and database administrators looking to enhance their MySQL skills! Written by ITXperts\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"Itxperts\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/itxperts.co.in\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-16T06:43:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-27T10:48:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2024\/10\/mysql-1.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1792\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"@mritxperts\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"@mritxperts\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/\"},\"author\":{\"name\":\"@mritxperts\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/77ad4d47f9f82583ee23e37010a52fc6\"},\"headline\":\"MySQL Numeric Functions\",\"datePublished\":\"2024-10-16T06:43:53+00:00\",\"dateModified\":\"2024-10-27T10:48:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/\"},\"wordCount\":415,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2024\/10\/mysql-1.webp\",\"articleSection\":[\"Learn MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/\",\"url\":\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/\",\"name\":\"MySQL Numeric Functions - Itxperts\",\"isPartOf\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2024\/10\/mysql-1.webp\",\"datePublished\":\"2024-10-16T06:43:53+00:00\",\"dateModified\":\"2024-10-27T10:48:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#primaryimage\",\"url\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2024\/10\/mysql-1.webp\",\"contentUrl\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2024\/10\/mysql-1.webp\",\"width\":1792,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/itxperts.co.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL Numeric Functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#website\",\"url\":\"https:\/\/itxperts.co.in\/blog\/\",\"name\":\"Itxperts\",\"description\":\"Leading Website Design Company in Madhya Pradesh\",\"publisher\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/#organization\"},\"alternateName\":\"Itxperts | Website Development in Madhya Pradesh\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/itxperts.co.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#organization\",\"name\":\"Itxperts\",\"alternateName\":\"Leading Website Design Company in Madhya Pradesh \u2013 Itxperts\",\"url\":\"https:\/\/itxperts.co.in\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/05\/cropped-itxperts_logo.png\",\"contentUrl\":\"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/05\/cropped-itxperts_logo.png\",\"width\":512,\"height\":512,\"caption\":\"Itxperts\"},\"image\":{\"@id\":\"https:\/\/itxperts.co.in\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/itxperts.co.in\",\"https:\/\/www.linkedin.com\/company\/itxpertsshivpuri\/\",\"https:\/\/www.instagram.com\/itxperts.co.in\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/77ad4d47f9f82583ee23e37010a52fc6\",\"name\":\"@mritxperts\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/702cffafd84d85872c0d42d33a9fa39140418d7c60a1311a1f8f55b005d0570b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/702cffafd84d85872c0d42d33a9fa39140418d7c60a1311a1f8f55b005d0570b?s=96&d=mm&r=g\",\"caption\":\"@mritxperts\"},\"description\":\"I am a full-stack web developer from India with over 8 years of experience in building dynamic and responsive web solutions. Specializing in both front-end and back-end development, I have a passion for creating seamless digital experiences. When I'm not coding, I enjoy sharing insights and tutorials on the latest web technologies, helping fellow developers stay ahead in the ever-evolving tech landscape.\",\"sameAs\":[\"https:\/\/itxperts.co.in\/blog\"],\"url\":\"https:\/\/itxperts.co.in\/blog\/author\/mritxpertsgmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MySQL Numeric Functions - Itxperts","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/","og_locale":"en_US","og_type":"article","og_title":"MySQL Numeric Functions - Itxperts","og_description":"In this blog post, we explore the essential numeric functions in MySQL, such as ABS(), CEIL(), FLOOR(), ROUND(), and MOD(). Each function is explained with examples to help you perform mathematical operations efficiently in your databases. Whether you're rounding numbers, calculating remainders, or generating random values, these functions will simplify your data manipulation tasks. Perfect for developers and database administrators looking to enhance their MySQL skills! Written by ITXperts","og_url":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/","og_site_name":"Itxperts","article_publisher":"https:\/\/www.facebook.com\/itxperts.co.in","article_published_time":"2024-10-16T06:43:53+00:00","article_modified_time":"2024-10-27T10:48:41+00:00","og_image":[{"width":1792,"height":1024,"url":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2024\/10\/mysql-1.webp","type":"image\/webp"}],"author":"@mritxperts","twitter_card":"summary_large_image","twitter_misc":{"Written by":"@mritxperts","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#article","isPartOf":{"@id":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/"},"author":{"name":"@mritxperts","@id":"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/77ad4d47f9f82583ee23e37010a52fc6"},"headline":"MySQL Numeric Functions","datePublished":"2024-10-16T06:43:53+00:00","dateModified":"2024-10-27T10:48:41+00:00","mainEntityOfPage":{"@id":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/"},"wordCount":415,"commentCount":0,"publisher":{"@id":"https:\/\/itxperts.co.in\/blog\/#organization"},"image":{"@id":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2024\/10\/mysql-1.webp","articleSection":["Learn MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/","url":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/","name":"MySQL Numeric Functions - Itxperts","isPartOf":{"@id":"https:\/\/itxperts.co.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#primaryimage"},"image":{"@id":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2024\/10\/mysql-1.webp","datePublished":"2024-10-16T06:43:53+00:00","dateModified":"2024-10-27T10:48:41+00:00","breadcrumb":{"@id":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#primaryimage","url":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2024\/10\/mysql-1.webp","contentUrl":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2024\/10\/mysql-1.webp","width":1792,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/itxperts.co.in\/blog\/all-numeric-functions-in-mysql-with-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/itxperts.co.in\/blog\/"},{"@type":"ListItem","position":2,"name":"MySQL Numeric Functions"}]},{"@type":"WebSite","@id":"https:\/\/itxperts.co.in\/blog\/#website","url":"https:\/\/itxperts.co.in\/blog\/","name":"Itxperts","description":"Leading Website Design Company in Madhya Pradesh","publisher":{"@id":"https:\/\/itxperts.co.in\/blog\/#organization"},"alternateName":"Itxperts | Website Development in Madhya Pradesh","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itxperts.co.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/itxperts.co.in\/blog\/#organization","name":"Itxperts","alternateName":"Leading Website Design Company in Madhya Pradesh \u2013 Itxperts","url":"https:\/\/itxperts.co.in\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itxperts.co.in\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/05\/cropped-itxperts_logo.png","contentUrl":"https:\/\/itxperts.co.in\/blog\/wp-content\/uploads\/2025\/05\/cropped-itxperts_logo.png","width":512,"height":512,"caption":"Itxperts"},"image":{"@id":"https:\/\/itxperts.co.in\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/itxperts.co.in","https:\/\/www.linkedin.com\/company\/itxpertsshivpuri\/","https:\/\/www.instagram.com\/itxperts.co.in\/"]},{"@type":"Person","@id":"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/77ad4d47f9f82583ee23e37010a52fc6","name":"@mritxperts","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itxperts.co.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/702cffafd84d85872c0d42d33a9fa39140418d7c60a1311a1f8f55b005d0570b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/702cffafd84d85872c0d42d33a9fa39140418d7c60a1311a1f8f55b005d0570b?s=96&d=mm&r=g","caption":"@mritxperts"},"description":"I am a full-stack web developer from India with over 8 years of experience in building dynamic and responsive web solutions. Specializing in both front-end and back-end development, I have a passion for creating seamless digital experiences. When I'm not coding, I enjoy sharing insights and tutorials on the latest web technologies, helping fellow developers stay ahead in the ever-evolving tech landscape.","sameAs":["https:\/\/itxperts.co.in\/blog"],"url":"https:\/\/itxperts.co.in\/blog\/author\/mritxpertsgmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/posts\/383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/comments?post=383"}],"version-history":[{"count":2,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions"}],"predecessor-version":[{"id":591,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions\/591"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/media\/384"}],"wp:attachment":[{"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/media?parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/categories?post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itxperts.co.in\/blog\/wp-json\/wp\/v2\/tags?post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}