Skip to Content
Head First SQL (Korean Edition), 2nd Edition
book

Head First SQL (Korean Edition), 2nd Edition

by Kimberly Fessel
June 2026
740 pages
14h 34m
Korean
O'Reilly Media, Inc.
Content preview from Head First SQL (Korean Edition), 2nd Edition

제12장. 임시 테이블: 단기 저장

이 작품은 AI를 사용하여 번역되었습니다. 여러분의 피드백과 의견을 환영합니다: translation-feedback@oreilly.com

Image

모든 것이 영구적일 필요는 없습니다. 지금까지는 데이터 테이블을 컴퓨터의 하드 드라이브에 저장해 왔기 때문에, SQL에서 로그아웃하거나 컴퓨터 전원을 끄더라도 데이터에 무제한으로 접근할 수 있었습니다. 하지만 모든 테이블이 영구적으로 남아야 하는 것은 아닙니다. 때로는 테이블을 잠시만 사용하다가, 마치 실패한 문신처럼 저절로 사라지기를 바라는 경우도 있습니다. 임시 테이블은 은 바로 그런 역할을 합니다. 임시 테이블은 일반 테이블과 똑같이 작동하지만, SQL 세션에서 로그아웃할 때 . 비용이 많이 드는 SQL 쿼리의 비용이 많이 드는 쿼리의 결과 결과가 사라지거나 중간 테이블이 디스크 공간을 너무 많이 차지할까 봐 걱정된다면, 나중에 후회할 일을 미리 막고 임시 테이블을 사용해 보세요.

무더운 날씨

Image

다음은 애비의 첫 번째 쿼리입니다. 그녀의 하위 쿼리는 “더운” 날씨에 해당하는 ID 번호를 가져옵니다. 그런 다음 외부 쿼리는 “더운” 식별자와 일치하는 날씨 ID를 가진 지역의 도시 및 국가 이름을 반환합니다.

쿼리 #1

SELECT city, country
FROM locations
WHERE weather_id = (SELECT weather_id
                    FROM weather
                    WHERE weather = 'hot');
참고

애비의 하위 쿼리는 “hot” 날씨의 ID 번호를 찾아냅니다.

Image
Image

애비는 이제 각 지점의 예산 요건을 확인합니다. 한편, 그녀의 코드 대부분은 그대로였지만, 모든 코드를 다시 입력해야 했습니다.

쿼리 #2

Image
city country 예산
로마 이탈리아 3000
마라케시 마라케시 모로코 2000
두바이 아랍에미리트 3000
마이애미 미국 3000

이제 애비는 travel_hourstravel_mode ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Tips for Designing Effective Presentation Slide Decks

Tips for Designing Effective Presentation Slide Decks

Curtis Newbold
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer
How to Overcome a Power Deficit

How to Overcome a Power Deficit

Cyril Bouquet, Jean-Louis Barsoux
Relational Power Is the New Currency of Hybrid Work

Relational Power Is the New Currency of Hybrid Work

Lebene Soga, Yemisi Bolade-Ogunfodun, Nazrul Islam, Joseph Amankwah-Amoah

Publisher Resources

ISBN: 0642572408091