나는이 형식으로 (당신이 대학에 있던 수업 일정과 유사) 테이블이 :함수를 사용하는 대신 쿼리로 작성할 수 있습니까?
8:00 - 9:00 MTF
9:00 - 10:15 TR
이 수 :
create table match_times
(
match_time varchar2(20 char),
match_sun_day char(1 char),
match_mon_day char(1 char),
match_tue_day char(1 char),
match_wed_day char(1 char),
match_thu_day char(1 char),
match_fri_day char(1 char),
match_sat_day char(1 char)
)
comment on column match_times.match_time is 'E.g. ''08:00-08:50''';
comment on column match_times.match_sun_day is '''U'' or null';
comment on column match_times.match_mon_day is '''M'' or null';
comment on column match_times.match_tue_day is '''T'' or null';
comment on column match_times.match_wed_day is '''W'' or null';
comment on column match_times.match_thu_day is '''R'' or null';
comment on column match_times.match_fri_day is '''F'' or null';
comment on column match_times.match_sat_day is '''S'' or null';
내가 예를 들어 저를 얻을 것이다 쿼리를 작성하려면 함수를 사용하여 쉽게 할 수 있지만 SQL 쿼리를 사용하여이 작업을 수행 할 수 있는지 궁금합니다. 이것은 중요하지 않습니다. 단지 지식 일뿐입니다.
EDIT : 죄송 합니다만, 나는 한 가지 중요한 설명을 놓쳤습니다. 경기 시간마다 여러 행이있을 수 있습니다. 한 행에 MF가 있고 다음 행에 W가있을 수 있습니다. 이제는 왜 사람들이 실제 create table 문을 요구하는지 이해합니다.
실제 create table 문을 포함 할 수 있습니까? 그러면 표가 어떻게 보이는지 더 잘 알 수 있습니다. 나는이 형식에서 무슨 일이 일어나는지 정말로 말할 수 없다. –
테이블에 대한 자세한 정보를 게시 할 수 있습니까? 예를 들어 데이터 유형은? 주일 값은 부울 값입니까? 시간 VARCHAR인가? – xil3
죄송합니다, 지금 실제 create table 문을 게시했습니다. 데이터 유형 대신 샘플 데이터를 사용하면 더 읽기 쉽다고 생각했습니다. – Zesty