我认为您可以使用
case when then以下语法:
SELECt CASE WHEN player1id = 1 THEN player2id ELSE player1id ENDFROM players WHERe player1id =1 OR player2id=1;
或者:
SELECt CASE WHEN player1id = 1 THEN player2id WHEN player2id =1 THEN player1id ENDFROM players WHERe player1id =1 OR player2id=1;
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)