Running Oracle Database 11g Release 11.1.0.7.0 - 64bit Production

CREATE TABLE mytable (mycol NVARCHAR2(10), mycol2 NVARCHAR2(10));
INSERT INTO mytable VALUES ('a', 'aa');
INSERT INTO mytable VALUES ('b', NULL);

So I have created the table and populated it with data.

===

SELECT * FROM mytable;

OK – result is :

MYCOL MYCOL2
a aa
b (null)

===

SELECT mycol, mycol2, CASE WHEN mycol2 IS NULL THEN 'is null' ELSE 'not null' END AS mycol3 FROM mytable

OK – result is :

MYCOL MYCOL2 MYCOL3
a aa not null
b (null) is null

===

SELECT mycol, mycol2, CASE WHEN mycol2 IS NULL THEN 'is null' ELSE mycol2 END AS mycol3 FROM mytable

Gets :

ORA-12704: character set mismatch
12704. 00000 – “character set mismatch”
<followed by some text specifying the possible causes>

===

SELECT mycol, mycol2, CASE WHEN mycol2 IS NULL THEN N'is null' ELSE mycol2 END AS mycol3 FROM mytable

OK – result is :

MYCOL MYCOL2 MYCOL3
a aa aa
b (null) is null



With this I can see that I need to prefix all string literals with “N”. I was wondering though is there a way to specify a ‘default’ character set so that I do not need to prefix the literals?

Thanks for any help on this.