WHAT IS USE OF COALESCE KEYWORD

step 1:

CREATE TABLE COLLEGE(SID NVARCHAR(10),SNAME NVARCHAR(20),PLACE NVARCHAR(20))

Step 2:

INSERT INTO COLLEGE VALUES(1,'SURESH',NULL),(NULL,'RAMESH','PUDUKKOTTAI'),(3,'RAMU','COIMBATORE')

-- ABOVE QUERY WILL RUN ONLY SQL 2008,2012

STEP 3:

SELECT COALESCE(SID,SNAME,PLACE) AS 'STUDNAME' FROM COLLEGE

STEP 4:

Post your Ans http://jssql.blogspot.in/







1 comment:

  1. sir this is the answer sir
    1
    RAMESH
    3

    but y it takes 3ed value as 3 sir?

    ReplyDelete

Featured Post

Understanding about Azure Region, Geographies, Availability Zones and Region Pairs

Introduction Microsoft Azure services are available in 53 regions around the world, with plans announced for 7 additional regions and 140+ a...

Subscribe to the FREE Weekly Newsletter to receive all the latest Microsoft Azure, AI, Xamarin

Popular Posts