사용자의 GUID와 실제 이름을 문자열로 유지하는 테이블이 있습니다. 나는 사용자를 기반으로 몇 가지 정보를 얻고 싶다. 그러나 어떤 필드를 사용해야합니까? 내 코드는 다음과 같아야합니다.uniqueidentifier 나 tsql의 문자열을 비교하는 것이 더 빠릅니다.
select *
from userinboxcount
where countDate >= startDate and countDate <= endDate and userid = '<guid here>'
or
select *
from userinboxcount
where countDate >= startDate and countDate <= endDate and username = "FirstName LastName"
그래, guid 및 사용자 이름은 타사 테이블/소프트웨어에서 가져온 것입니다. – dotnetN00b