Skip to Content
러닝 SQL: 데이터 생성, 검색, 조작까지 데이터 제대로 주무르기
book

러닝 SQL: 데이터 생성, 검색, 조작까지 데이터 제대로 주무르기

by 류수미, 송희정, 앨런 볼리외
March 2021
Beginner to intermediate
456 pages
12h 49m
Korean
Hanbit Media, Inc.
Content preview from 러닝 SQL: 데이터 생성, 검색, 조작까지 데이터 제대로 주무르기
327
14
들어 다음 명령문은
customer
_
vw
뷰를 사용하여
customer
_
id
,
first
_
name
last
_
name
열만 채우려고 합니다.
mysql> INSERT INTO customer_vw
-> (customer_id,
-> first_name,
-> last_name)
-> VALUES (99999,'ROBERT','SIMPSON');
ERROR 1471 (HY000): The target table customer_vw of the INSERT
is not insertable-into
지금까지 단순한 뷰의 제한사항을 확인했습니다. 다음 절에서는 여러 테이블을 조인하는 복잡
한 뷰의 사용 방법을 보여줍니다.
14.3.2
. 복잡한업데이트
단일 테이블 뷰가 일반적으로 쓰이지만, 여러분이 접하는 대부분의 뷰는 기본 쿼리의
from
에 여러 테이블을 포함합니다. 예를 들어 다음 뷰는
customer
,
address
,
city
country
테이블을 조인하여 고객의 모든 데이터를 쉽게 쿼리할 수 있습니다.
CREATE VIEW customer_details
AS
SELECT c.customer_id,
c.store_id,
c.first_name,
c.last_name,
c.address_id,
c.active,
c.create_date, ...
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.
Start your free trial

You might also like

클라우드 네이티브를 위한 데이터 센터 네트워크 구축: 데이터 센터 네트워킹을 위한 아키텍처, 프로토콜, 도구

클라우드 네이티브를 위한 데이터 센터 네트워크 구축: 데이터 센터 네트워킹을 위한 아키텍처, 프로토콜, 도구

정기훈, 디네시 G. 더트

Publisher Resources

ISBN: 9791162244074