Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Teaser

Status
Not open for further replies.

ESquared

Programmer
Dec 23, 2003
6,129
US
What output will be given by the following query?
Code:
select
   len(a),
   len(b),
   convert(varchar(10), a),
   convert(varchar(10), b),
   ascii(substring(a, 2, 1)),
   ascii(substring(b, 2, 1))
from (
   select
      a = convert([b]var[/b]binary(10), convert(varchar(10), 'a')),
      b = convert(   binary(10), convert(varchar(10), 'b'))
) x
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top