Incorrect syntax near 'CAST' in sql server -


i have table pin_mst below

enter image description here

but following query showing error

msg 102, level 15, state 1, line 1 incorrect syntax near 'cast'. 

.. plz help.

select top cast(1 varchar(3)) pin_id pin_mst 

try 1 -

select top 1 pin_id  pin_mst 

or -

select top 1      cast(1 varchar(3)),      pin_id  pin_mst 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -