{"id":22622959,"url":"https://github.com/mrkem598/sql-functions","last_synced_at":"2026-01-06T18:51:29.014Z","repository":{"id":78434342,"uuid":"113717156","full_name":"mrkem598/SQL-FUNCTIONS","owner":"mrkem598","description":"SQL functions are built into Oracle and are available for use in various appropriate SQL statements. You can also create your own function using PL/SQL.","archived":false,"fork":false,"pushed_at":"2020-01-18T02:25:42.000Z","size":952,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-03T12:53:15.217Z","etag":null,"topics":["avg","max","mod","oracle-11g","sql","sql-functions","sqrt","truncate"],"latest_commit_sha":null,"homepage":"https://mrkem598.github.io/SQL-FUNCTIONS/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrkem598.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-10T02:38:09.000Z","updated_at":"2017-12-10T11:00:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3a4b734-4ee0-48ac-bff9-c3ea42a068af","html_url":"https://github.com/mrkem598/SQL-FUNCTIONS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkem598%2FSQL-FUNCTIONS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkem598%2FSQL-FUNCTIONS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkem598%2FSQL-FUNCTIONS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkem598%2FSQL-FUNCTIONS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrkem598","download_url":"https://codeload.github.com/mrkem598/SQL-FUNCTIONS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246131246,"owners_count":20728299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avg","max","mod","oracle-11g","sql","sql-functions","sqrt","truncate"],"created_at":"2024-12-08T23:41:44.363Z","updated_at":"2026-01-06T18:51:28.979Z","avatar_url":"https://github.com/mrkem598.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"***\n# SQL FUNCTIONS\n***\n\u003cimg width=\"800\" alt=\"screen shot 2017-12-10 at 5 47 34 am\" src=\"https://user-images.githubusercontent.com/23619819/33804207-0f3f3088-dd6e-11e7-90c8-663a36b60777.png\"\u003e\n\nSQL functions are built into Oracle and are available for use in various appropriate SQL statements. You can also create your own function using PL/SQL.\n***\n# Single-Row Functions\n***\nSingle-row functions return a single result row for every row of a queried table or view. These functions can appear in select lists, WHERE clauses, START WITH and CONNECT BY clauses, and HAVING clauses.\n***\n# Oracle SQL Functions can be divided into following categories\n***\n•\tNumber Functions\n•\tCharacter Functions\n•\tMiscellaneous Single Row Functions\n•\tAggregate Functions\n•\tDate and Time Functions\n***\n# Here are the explanation and example of these functions\n***\nNumber Functions (also known as Math Functions)\nNumber functions accept numeric input and return numeric values. Most of these functions return values that are accurate to 38 decimal digits.\n***\n# The number functions available in Oracle are:\n***\nABS  ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSH EXP FLOOR LN LOG \nMOD POWER ROUND (number) SIGN SIN SINH SQRT TAN TANH TRUNC (number)\n***\n# ABS\n***\nABS returns the absolute value of n.\nThe following example returns the absolute value of -87:\nSELECT ABS(-87) \"Absolute\" FROM DUAL;\n\n  Absolute\n  ----------\n        87\n***\n# ACOS\n***\nACOS returns the arc cosine of n. Inputs are in the range of -1 to 1, and outputs are in the range of 0 to pi and are expressed in radians.\nThe following example returns the arc cosine of .3:\nSELECT ACOS(.3)\"Arc_Cosine\" FROM DUAL;\n\nArc_Cosine\n----------\n1.26610367\nSimilar to ACOS, you have ASIN (Arc Sine), ATAN (Arc Tangent) functions.\n***\n# CIEL\n***\nReturns the lowest integer above the given number.\nExample:\nThe following function return the lowest integer above 3.456;\nselect ciel(3.456) “Ciel” from dual;\n\nCiel\n---------\n        4\n***\n# FLOOR \n***\nReturns the highest integer below the given number.\nExample:\nThe following function return the highest integer below 3.456;\nselect floor(3.456) “Floor” from dual;\n\nFloor\n------------\n        3\n***\n# COS\n***\nReturns the cosine of an angle (in radians).\nExample:\nThe following example returns the COSINE angle of 60 radians.\nselect  cos(60) “Cosine” from dual;\n\n***\n# SIN\n***\nReturns the Sine of an angle (in radians).\nExample:\nThe following example returns the SINE angle of 60 radians.\nselect  SIN(60) “Sine” from dual;\n*** \n# TAN\n***\nReturns the Tangent of an angle (in radians).\nExample:\nThe following example returns the tangent angle of 60 radians.\nselect  Tan(60) “Tangent” from dual;\nSimilar to SIN, COS, TAN  functions hyperbolic functions  SINH, COSH, TANH are also available in oracle.\n***\n# MOD\n***\nReturns the remainder after dividing m with n.\nExample\nThe following example returns the remainder after dividing 30 by 4.\nSelect mod(30,4) “MOD” from dual;\n\nMOD\n---------\n        2\n***\n# POWER\n***\nReturns the power of m, raised to n.\nExample\nThe following example returns the 2 raised to the power of 3.\nselect  power(2,3) “Power” from dual;\n\nPOWER\n---------\n        8\n***\n# EXP\n***\nReturns the e raised to the power of n.\nExample\nThe following example returns the e raised to power of 2.\nselect exp(2) “e raised to 2” from dual;\n\nE RAISED TO 2\n-------------\n***       \n# LN\n***\nReturns natural logarithm of n.\nExample\nThe following example returns the natural logarithm of 2.\nselect ln(2) from dual;\n\nLN\n------------\n \n# LOG\nReturns the logarithm, base m, of n.\nExample\nThe following example returns the log of 100.\nselect log(10,100) from dual;\n\nLOG\n---------\n        2\n# ROUND\nReturns a decimal number rounded of to a given decimal positions.\nExample\nThe following example returns the no. 3.4573 rounded to 2 decimals.\nselect round(3.4573,2) “Round” from dual;\n\nRound\n------------\n        3.46\n# TRUNC\nReturns a decimal number Truncated to a given decimal positions.\n\nExample\nThe following example returns the no. 3.4573 truncated to 2 decimals.\nselect round(3.4573,2) “Round” from dual;\n\nRound\n------------\n        3.45\n# SQRT\nReturns  the square root of a given number.\nExample: The following example returns the square root of  16.\nselect  sqrt(16) from dual;\n\nSQRT\n---------\n        4\n\u003cimg width=\"800\" alt=\"screen shot 2017-12-10 at 5 48 01 am\" src=\"https://user-images.githubusercontent.com/23619819/33804219-503e1afe-dd6e-11e7-96e4-77c2e117c627.png\"\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrkem598%2Fsql-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrkem598%2Fsql-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrkem598%2Fsql-functions/lists"}