What will be the output of below Sql Statement?

Select Convert(bit,1);
Select Convert(bit,0);

 Posted by vishalneeraj-24503 on 7/1/2014 | Category: Sql Server Interview questions | Views: 934 | Points: 40

Output would be 1 for First Sql Statement and 0 for Second Statement.Because we have converted 1 and 0 as Bit datatype using Convert function.So whatever datatype will be passed in convert function will be evaluated as supplied data type in Convert function.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response