jm_p_op

SQL search same columns 본문

잡다한 언어/sql

SQL search same columns

jm_p_op 2023. 2. 18. 14:59

orders & point_users same colums

 

with

table1 as (select column_name from information_schema.columns

where table_name = 'orders'),

table2 as (select column_name from information_schema.columns

where table_name = 'point_users')

select t1.column_name as '중복 테이블' from table1 t1

inner join table2 t2 on t1.column_name = t2.column_name;

'잡다한 언어 > sql' 카테고리의 다른 글

SQL 문법  (0) 2023.02.18