|
Posted by joeNOSPAM@BEA.com on 09/26/69 11:47
The N'xxxxx syntax would be redundant but not harmful. It
just means that the data in nvarchar, and if the driver is
sending strings as unicode (all MSSQL JDBC drivers do
this by default), it is unnecessary for prepared statement
parameter values. For constants it might be good.
The performance issue is as I described. The huge performance
problem comes by mismatching varchar with nvarchar. If you
stick to one, there is no problem. I believe the amount of
space taken up by nvarchar compared to varchar is a minimal
disk space issue only. Because your app. is multilingual, I
can't imagine a reason you'd continue to consider varchar.
Joe
Eg: PreparedStatement p = c.prepareStatement("select * from foo where
bar = \"N'myconstant\" and qwe = ?");
p.setString(1, "myvariabledoesnotneedacapitalN");
Joe Weinstein at BEA Systems
Navigation:
[Reply to this message]
|