but when I try to add this sql repository to zypper, i get this error
Repository named ‘packages-microsoft-com-prod’ already exists. Please use another alias.
I thought i already added this repository but that’s probably another repository because when I try to install mssql-tools18, it can’t find the package
Look into your repo list if it is true what the message says?
And when you are uncertain post that list here for comment?
zypper lr -d
And as @arvidjaar says, either change the Alias of the existing repo, or add the new repo with another Alias, or do both. After all it is you that are the maintainer of the repo definitions in your system and you should give the repos suitable Aliases that are useful to you.