Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Get Data from SQL Server without Null Values
WhatsApp
Gaurav Kumar
10y
4.1
k
0
1
25
Blog
I have a table like below structure:
FName MName LName
Gaurav NULL Kumar
Piyush Sharma NULL
How can I write a query so that I can get an output without null values. I dont want them in my result.
Gaurav Kumar
Piyush Sharma
Here is the solution;
select
IsNull
(FName,
''
) +
' '
+
IsNull
(MName,
''
) +
' '
+
IsNull
(LName,
''
)
from
tableName
IsNull function checks first paramter…. if it is null then second parameter is returned else first parameter is returned as it is.
Get Data from SQL Server without Null Values
Up Next
Handling Null Values in DataTable's in DateTime Column Using SQL DateTime DataType
Ebook Download
View all
Basic SQL Queries
Read by 19.4k people
Download Now!
Learn
View all
Membership not found