如何将此SQL转换为使用连接?

时间:2009-09-19 05:05:57

标签: sql mysql

如何将此SQL转换为使用连接?

SELECT 
   V.V_CONTACT, V.V_PHONE 
FROM 
   VENDOR AS V, 
   PRODUCT AS P 
WHERE 
   P.P_CODE = 'P1' AND 
   V.V_CODE = P.V_CODE;

1 个答案:

答案 0 :(得分:4)

SELECT    
   V.V_CONTACT, V.V_PHONE 
FROM
   VENDOR AS V 
   JOIN PRODUCT AS P ON V.V_CODE = P.V_CODE
WHERE    
   P.P_CODE = 'P1';