How to resolve this query sql this? -
i have query sql this
select fname, idcard, left(idcard,3) kodecard tcard kodecard = '200'
how resolve query? have 2 column (fname, , idcard) , want filter first 3 digits in idcard column.
could give me solution?
just use left
function in condition
select fname, idcard tcard left(idcard,3) = '200'
you may use like
well.
select fname, idcard tcard idcard '200%'
this solution better since allows query processor use index (if available).
Comments
Post a Comment