Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOD function is missing #3423

Closed
druvv opened this issue May 16, 2022 · 2 comments
Closed

MOD function is missing #3423

druvv opened this issue May 16, 2022 · 2 comments
Labels
good first issue Good for newcomers sql Issue with SQL

Comments

@druvv
Copy link
Contributor

druvv commented May 16, 2022

The modulo operator works in Dolt:

> SELECT 2 % 2;
+-------+
| 2 % 2 |
+-------+
| 0     |
+-------+
> SELECT 2 MOD 2;
+-------+
| 2 MOD 2 |
+-------+
| 0     |
+-------+

But the MOD function is missing:

> SELECT MOD(2, 2);
function: 'mod, maybe you mean mid or md5?' not found

MySQL reference:
https://dev.mysql.com/doc/refman/8.0/en/mathematical-functions.html#function_mod

@druvv druvv assigned druvv and unassigned druvv May 16, 2022
@timsehn
Copy link
Contributor

timsehn commented May 16, 2022

Indeed. From our docs.

image

I don't think we need a ticket for every one of these. Why did you stumble on it?

@druvv
Copy link
Contributor Author

druvv commented May 18, 2022

The first google result when you search take modulus sql shows this link:
https://www.w3resource.com/sql/arithmetic-functions/mod.php#:~:text=SQL%20MOD()%20function%20is,the%20specified%20column%20or%20expression.

So I tried that.

@fulghum fulghum added the sql Issue with SQL label May 19, 2022
@fulghum fulghum added the good first issue Good for newcomers label May 20, 2022
@jycor jycor closed this as completed May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers sql Issue with SQL
Projects
None yet
Development

No branches or pull requests

4 participants