【发布时间】:2016-05-06 18:14:57
【问题描述】:
INSERT INTO books(book_id, title, author_last_name, author_first_name, classify)
VALUES (1000, 'The Picture of Dorian Gray', 'Wilde', 'Oscar', 'fiction');
INSERT INTO books(book_id, title, author_last_name, author_first_name, classify)
VALUES (1001, 'Think Big', 'Carson', 'Dr. Ben', 'non - fiction');
INSERT INTO books(book_id, title, author_last_name, author_first_name, classify)
VALUES (1003, 'Mathematical Scandals', 'Pappas', ' ', 'non - fiction');
INSERT INTO books(book_id, title, author_last_name, author_first_name, classify)
VALUES (1004, 'SQL', 'Harris', 'Andy', 'non - fiction');
INSERT INTO books(book_id, title, author_last_name, author_first_name, classify)
VALUES (1010, 'Excel 2016', 'Chan', ' ', 'non - fiction');
commit;
这是我的桌子的价值。在一些记录中,我插入了空字符串''。 如何使用 nvl 函数将空字符串替换为 NULL 值
【问题讨论】:
-
你的意思是“用空字符串替换 null 吗?”
-
替换空字符串(在Oracle中与null相同),或者只是空格的值?
-
@AlexPoole 空字符串与 null 不同。
-
@JosephStyons - 它们在 Oracle 中是相同的(varchar 和 varchar2 等)。 Currently, anyway *8-)
-
@JosephStyons 在 Oracle 中,是的。