oracle 默认escape_在oracle中设置转义字符(set escape character in oracle)

I'm working on a Java program that try to reset a user's password in oracle and sql-server. This password is a random generated password that will have some character that is not acceptable as a normal string. Eg. ',"",;

The command that I'm using to reset user's password is :

oracle: ALTER USER IDENTIFIED BY

sql-server: ALTER LOGIN WITH PASSWORD = ''

How can I do this reset so that it can accept all kind of special character?

I did google and found out about quoting method:. Also I did found out about using single code and double code. But what if the password generated have a " or same quote delimiter inside that password? Then it will be a problem.

Eg. IDENTIFIED BY 'jks'k"fjh''d'

Eg. password = q[#kkksdj#jsksls#]

Eg. password = "nm.js""kh:kjhs"

Is there any way for me to do this inside the oracle and sql-server? Or do I need to escape each character one by one from java before sending to oracle/sql-server? My reset program for oracle and sql-server are different. So the method can be different.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值