Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8453129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:41:20+00:00 2026-06-10T11:41:20+00:00

In sql server, I see a strange behaviour: When I do select col1+ ‘

  • 0

In sql server, I see a strange behaviour:
When I do

select col1+ ' ' + cast(col2 as varchar(10)) as concat_col

it returns me a column with a value = NULL (not a blank column).

My suspicion is that it is because col2 has a value = NULL (not blank column).
So what is the reason for this behavior? But more importantly, what is the meaning of a column with value = NULL as opposed to a blank column? I do not imagine somebody went in the table and updated all the columns with value = NULL.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:41:21+00:00Added an answer on June 10, 2026 at 11:41 am

    NULL means that the field does not have any value. You can use ISNULL function to convert a null value into something that you want.The following will hopefully give you the correct result (will not give null)

    select ISNULL(col1,'')+ ' ' + cast(ISNULL(col2,'') as varchar(10)) as concat_col
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can see SQL Server Compact Destination under Data Flow Destinations, but I am
I see that with SQL Server 2005 you can pass a parameter as numeric
When in 'SQL Server Configuration Manager' I see, under 'SQL Server Services', 2 items
I have sql server procedure, please see below. ALTER PROCEDURE [dbo].[uspInsertDelegate] ( @CourseID int,
How can I see opened connections /running queries in SQL Server 2008?
Using Microsoft SQL Server 2005, is there any way to see when a table
In Microsoft SQL Server: I have seen this question several times, but can't see
So I was playing with my MS SQL Server 2008 app to see how
How to see this format hh:mm from hh:mm:ss in SQL Server 2008 query ?
I have a setup a SQL Server instance that I can see from all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.