SELECT B.deptname,
A.badgenumber,
A.userid,
A.SSN,
A.name
FROM dbo. USERINFO A
INNER JOIN dbo. Departments B on a.defaultdeptid = B.deptid
WHERE A.SSN is not NULL
And b.deptid like '% '
Table ' USERINFO '. Scan count 1, logic read 278 times, physical read 0 times, pre-read 0 times.
Table ' departments '. Scan count 1, logic read 4 times, physical read 0 times, pre-read 0 times.
SQL Server Execution Time:
CPU time = 15 milliseconds, time-consuming = 54 milliseconds.
(2252 rows affected)
SELECT B.deptname,
A.badgenumber,
A.userid,
A.SSN,
A.name
FROM dbo. USERINFO A
INNER JOIN dbo. Departments B on a.defaultdeptid = B.deptid
WHERE A.SSN is not NULL
and B.deptid <> '
Table ' USERINFO '. Scan count 1, logic read 278 times, physical read 0 times, pre-read 0 times.
Table ' departments '. Scan count 2, logic read 10 times, physical read 0 times, pre-read 0 times.
SQL Server Execution Time:
CPU time = 15 milliseconds, time-consuming = 125 milliseconds.
(2252 rows affected)
SQL Server like fuzzy query <> query comparison