[SQL] ANSI, Oracle, MS-SQL에서 outer join 비교
ANSI와 오라클, MS-SQL용 OUTER JOIN 쓰는 법을 보자. 샘플 데이터 create table Test1 ( num int, name varchar(10) ) insert into Test1 values ( 1, '협객'); insert into Test1 values ( 2, '철수'); insert into Test1 values ( 3, '영희'); insert into Test1 values ( 4, '전우치'); create table Test2 ( num int, name varchar(20) ) insert into Test2 values ( 1, '아바타'); insert into Test2 values ( 2, '전우치'); insert into Test2 values ( 3..
더보기
[Sybase] Sybase용 SQL scripts
Sybase용 SQL scripts # Procedure의 응답 시간 보기 select ProcName = isnull(object_name(ProcedureID, DBID), "UNKNOWN"), DBName = isnull(db_name(DBID), "UNKNOWN"), ElapsedTime = datediff(ms, min(StartTime), max(EndTime)) from master..monSysStatement group by SPID, DBID, ProcedureID, BatchID having ProcedureID != 0 order by datediff(ms, min(StartTime), max(EndTime)) # 부하많은 SQL 찾기 select a.SPID,a.KPID,a.Pro..
더보기