Drop user if exists

How can I check if a user already exists - since DROP USER IF EXISTS is not possible ?

Hi Walter!

Thank you for using OmniSci and providing your feedback.

At this time, your request would be a manual two step process. If you have admin privileges, you could use the /u command in omnisql which will retrieve the list of users. You can then manually inspect if the user exists and then use the DROP USER command.

I have added a DROP USER IF EXISTS feature request to our backlog.

Thank you very much for the quick reply.

I’m accessing the database via JDBC - so I would need a SQL query to determine the existence of a user account - any chance ?

Not at this time. We already have a request to allow this type of queries for system information. I will add your vote to that request.

I would prefer the DROP USER IF EXISTS solution - at the moment I can work around the problem - but it would be nice if there was a solution in the foreseeable future. :grinning:

It’s likely that in the future, both of them will materialize on omnisci database :wink: