ISNULL (SQL Server) NVL (Oracle) SQL In 2 Mins Video 2

preview_player
Показать описание
DROP TABLE IF EXISTS tblEmployee_Demo
CREATE TABLE tblEmployee_Demo(ID INT,
Name Varchar(20),
Location_1 Varchar(20),
Location_2 Varchar(20)
)
INSERT tblEmployee_Demo VALUES (1,'Smith','Newyork', 'London')
INSERT tblEmployee_Demo VALUES (2,'Peter','Australia', NULL)
INSERT tblEmployee_Demo VALUES (3,'David',NULL, 'Canada')
INSERT tblEmployee_Demo VALUES (4,'George',NULL,'Japan')

-- 2. ISNULL -- SQL Server
-- NVL -- ORACLE
-- Its replaces NULL Value with more meaningful alternative in the result

SELECT * FROM tblEmployee_Demo
SELECT ID, Name, ISNULL(Location_1,Location_2) AS Location_1, ISNULL(Location_2, Location_1) AS Location_2
FROM tblEmployee_Demo

-------------------------
This channel would provide new videos on SQL, ETL and Data warehouse concepts. I would create a separate play list for SQL Tutorials for beginners, advanced concepts, Interview questions and data warehousing concepts

Please like my facebook page:

Facebook Page:

Youtube Channel:
Комментарии
Автор

Please do shorts as explained in a timeline for 2 minutes, so that it would be really helpful to the aspirants. Thanks

mahithamylo