diff --git a/lib/modules/Sql.pmod/module.pmod b/lib/modules/Sql.pmod/module.pmod
index 4f64bcbccabba262342d27dc50d1375f42825edd..6edaf1333fb015d4d079ccb37fc5aa3bbefacaf7 100644
--- a/lib/modules/Sql.pmod/module.pmod
+++ b/lib/modules/Sql.pmod/module.pmod
@@ -25,7 +25,7 @@ Val.Null `->NULL() {return Val->null;}
 //! @deprecated Val.Null
 //!
 //! @seealso
-//!   @[Val.Null], @[Val.null], @[Sql.NULL]
+//!   @[Val.Null], @[Val.null]
 
 //! @endclass
 
diff --git a/lib/modules/Val.pmod b/lib/modules/Val.pmod
index 1a56eedcaa6c4079c443289464db443e6f0b7ba3..d07a1f0585792506dad6b4c197bdadfd9ffa9fcb 100644
--- a/lib/modules/Val.pmod
+++ b/lib/modules/Val.pmod
@@ -96,20 +96,13 @@ False false = False();
 //! @[Protocols.JSON] uses these objects to represent the JSON
 //! literals @expr{true@} and @expr{false@}.
 
-class Null
+//! @class Null
 //! Type for the @[Val.null] object. Do not create more instances of
 //! this - use @[Val.null] instead.
-{
-  inherit Builtin.SqlNull;
 
-  constant is_val_null = 1;
-  //! Nonzero recognition constant.
+constant Null = Builtin.Null;
 
-  protected string _sprintf (int flag)
-  {
-    return flag == 'O' && "Val.null";
-  }
-}
+//! @endclass
 
 Null null = Null();
 //! Object that represents a null value.
diff --git a/src/builtin.cmod b/src/builtin.cmod
index e8664e110e44597df6b29d253b249e7a77f641c6..1041a96d305de0abe0013754036f6be4f956bb43 100644
--- a/src/builtin.cmod
+++ b/src/builtin.cmod
@@ -3679,7 +3679,7 @@ PIKEFUN function(mixed:void) _get_setter(object o, string s)
 /*! @endclass
  */
 
-/*! @class SqlNull
+/*! @class Null
  *!
  *! This class is used to implement the low-level aspects of @[Val.Null].
  *!
@@ -3696,12 +3696,20 @@ PIKEFUN function(mixed:void) _get_setter(object o, string s)
  *! @seealso
  *!   @[Val.Null], @[Val.null]
  */
-PIKECLASS SqlNull
+PIKECLASS Null
 {
   EXTRA {
+    /*! @decl constant is_val_null = 1
+     *!
+     *! Nonzero recognition constant.
+     */
+    add_integer_constant("is_val_null", 1, 0);
+
     /*! @decl constant is_sql_null = 1
      *!
      *! SQL Null marker.
+     *!
+     *! @deprecated is_val_null
      */
     add_integer_constant("is_sql_null", 1, 0);
   }
@@ -3717,7 +3725,7 @@ PIKECLASS SqlNull
   {
     pop_n_elems(args);
     if (fmt == 'O') {
-      push_constant_text("Sql.NULL");
+      push_constant_text("Val.null");
     } else {
       push_undefined();
     }
@@ -3738,7 +3746,7 @@ PIKECLASS SqlNull
       push_int(0);
       return;
     }
-    push_constant_text("is_sql_null");
+    push_constant_text("is_val_null");
     o_index();
   }
 
@@ -4891,7 +4899,7 @@ GET_VAL (null)
  * ought to be fixed to use dynamic lookup of them instead. */
 PMOD_EXPORT struct program *get_sql_null_prog(void)
 {
-  return SqlNull_program;
+  return Null_program;
 }
 
 void init_builtin(void)
diff --git a/src/modules/JSON/testsuite.in b/src/modules/JSON/testsuite.in
index d0c62c32c28b528a764a16e7145ad56b75a02faf..65b771553c25b0400cdd51540835438346ec4541 100644
--- a/src/modules/JSON/testsuite.in
+++ b/src/modules/JSON/testsuite.in
@@ -70,8 +70,8 @@ return Standards.JSON.encode(m);
 
 test_dec_enc_canon([["{\"a\":[{\"b\":2}]}"]], ([ "a":({(["b":2])}) ]))
 
-test_enc(Sql.NULL, "null")
-test_eval_error( Standards.JSON.encode(Sql.Null) ) dnl FIXME?
+test_enc(Val.null, "null")
+test_eval_error( Standards.JSON.encode(Val.Null) ) dnl FIXME?
 					dnl No, we can't encode types. /mast
 test_any([[
 class X { string encode_json() { return "smallpox"; } };
diff --git a/src/modules/Oracle/oracle.c b/src/modules/Oracle/oracle.c
index 6a791690c07f7a26c729668fbd6f472ee32d1f4e..70567172f682929220f2877798f37b302401ae59 100644
--- a/src/modules/Oracle/oracle.c
+++ b/src/modules/Oracle/oracle.c
@@ -2616,9 +2616,9 @@ static void dbnull_eq(INT32 args)
   push_constant_text("is_oracle_null");
   o_index();
   if ((Pike_sp[-1].type != T_INT) || !Pike_sp[-1].u.integer) {
-    /* No - is it the generic Sql.NULL? */
+    /* No - is it the generic Val.null? */
     pop_stack();
-    push_constant_text("is_sql_null");
+    push_constant_text("is_val_null");
     o_index();
     return;
   }