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

Improving C# Performance by Using AsSpan and Avoiding Substring

During development and everyday use, Substring is often the go-to choice for string manipulation. However, there are cases where Substring c...

MSDEVBUILD - English Channel

MSDEVBUILD - Tamil Channel

Popular Posts