A.Name,
A.COLUMN1,
B.COLUMN2,
C.COLUMN3,
D.COLUMN4
FROM
A LEFT JOIN B
ON ( A.NAME = B.NAME )
LEFT JOIN C
ON ( A.NAME = C.NAME )
LEFT JOIN D
ON ( A.NAME = D.NAME )
UNION
SELECT
B.Name,
A.COLUMN1,
B.COLUMN2,
C.COLUMN3,
D.COLUMN4
FROM
B LEFT JOIN A
ON ( A.NAME = B.NAME )
LEFT JOIN C
ON ( B.NAME = C.NAME )
LEFT JOIN D
ON ( B.NAME = D.NAME )
UNION
SELECT
C.Name,
A.COLUMN1,
B.COLUMN2,
C.COLUMN3,
D.COLUMN4
FROM
C LEFT JOIN A
ON ( C.NAME = A.NAME )
LEFT JOIN B
ON ( B.NAME = C.NAME )
LEFT JOIN D
ON ( C.NAME = D.NAME )
UNION
SELECT
D.Name,
A.COLUMN1,
B.COLUMN2,
C.COLUMN3,
D.COLUMN4
FROM
D LEFT JOIN A
ON ( D.NAME = A.NAME )
LEFT JOIN B
ON ( B.NAME = D.NAME )
LEFT JOIN C
ON ( C.NAME = D.NAME )
PDATE mysql.user SET HOST = "localhost" WHERE USER = "root"FLUSH PRIVILEGES
user 表中的第一个字段为%表示开启远程连接,把%删掉就是关闭远程连接了.
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)