All ใน Union Query
กระทู้เก่าบอร์ด อ.Yeadram

 1,571   2
URL.หัวข้อ / URL
All ใน Union Query

ธรรมดาผมทำ Union Query โดย Coppy จาก SQL Query มา 2 Query
จะมีตัวเชื่อม คือ Union แต่ผมเจอ Query อยู่อันหนึ่ง มี All ร่วมด้วย
UNION ALL SELECT........ อยากทราบว่า All มีความหมายว่าอย่างไรครับ

2 Reply in this Topic. Dispaly 1 pages and you are on page number 1

1 @R11625
จาก help ครับ
By default, no duplicate records are returned when you use a UNION operation; however, you can include the ALL predicate to ensure that all records are returned. This also makes the query run faster.

แปลว่า โดยปกติ จะคืน record ที่ไม่ซ้ำมาให้ เมื่อใส่ All จะส่งค่าทุก record - ข้อดีที่แถมมาคือ จะเร็วกว่า(ในการคำนวณเพราะไม่ต้องตัด record ซ้า - แต่อาจจะช้าตอนส่งข้อมูลผ่าน network ถ้า record ซ้ำเยอะ)
2 @R11626
ขอบคุณ อ.PichaiTC มากครับ
@ ประกาศใช้งานเว็บบอร์ดใหม่ => บอร์ดเรียนรู้ Access สำหรับคนไทย
แล้วจะใส่ลิ้งอ้างอิงมาที่โพสต์เก่านี้หรือไม่ก็ตามสะดวกครับ
Time: 0.2728s