user2271004
user2271004

Reputation: 3

How to display explicit null for a multiple columns

How to display an explicit null for a number of columns in an Oracle SQL? To be more specific, I would like to use a SET XXXXXX OFF/ON to display null when a column contains null value as opposed to using NVL for every single column. Thank you in advance for you advise.

Upvotes: 0

Views: 92

Answers (1)

Ed Gibbs
Ed Gibbs

Reputation: 26343

If you're using SQL*Plus, it has a SET NULL command. For example, to display every NULL value as an asterisk (*), just do this:

SET NULL '*'

The SQL*Plus default setting is an empty string, so to set it back to default just do this:

SET NULL ''

Upvotes: 4

Related Questions