php
Pages
(Move to ...)
主页
▼
Friday, July 26, 2013
SQL: exists
Today I figured out that we can use sql "exists" in the select part of a query
e.g. select name, exists (select 1 from girls where bf_name = boys.name) has_bf from boys b
result:
name has_bf
------------
A t
B f
C t
‹
›
Home
View web version