Could you tell me how to realize this function with SQL?

first of all, I want to query the department to which the user belongs

select * from dept where id in (select deptId from employee where id="00")

the above statement is not good. If you want to achieve such a result, how can you use SQL statement to achieve such a function?

Dec.31,2021

SELECT b.* FROM employee a, dept b WHERE a.id = '00' AND FIND_IN_SET(b.id, a.deptId) 

FIND_IN_SET is a function of mysql . Other databases are not applicable

.

sqlserver it seems that the same effect can be achieved through the CHARINDEX function, but there is no environment test

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37a44-2c0a7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37a44-2c0a7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?