我需要以名字开头的查询这是我的查询:
if(@firstName <> '')
BEGIN
set @queryString = @queryString+ ' and UPPER(col_FirstName) like ''%' +@firstName +'%'''
END
if(@lastName <> '')
BEGIN
set @queryString = @queryString + ' and UPPER(col_LastName) like ''%' +@lastName +'%'''
但它在中间搜索名字我也只想用首字母搜索谢谢