PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
Untitled
0 sec ago
Untitled
2 sec ago
Untitled
5 sec ago
Untitled
6 sec ago
Untitled
11 sec ago
Untitled
12 sec ago
Untitled
14 sec ago
Untitled
16 sec ago
Untitled
By: a guest on
May 7th, 2012
| syntax:
None
| size: 0.26 KB | hits: 7 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
Is there some way to select the first table without writing all the fields names in the query?
SELECT DISTINCT t1.*
from T1
join t2 on condition
SELECT DISTINCT T1.*
FROM T1 JOIN T2 ON T1.id = T2.id;
SELECT *
FROM T1
WHERE id IN (SELECT id FROM T2);
create a
new version
of this paste
RAW Paste Data
Is there some way to select the first table without writing all the fields names in the query? SELECT DISTINCT t1.* from T1 join t2 on condition SELECT DISTINCT T1.* FROM T1 JOIN T2 ON T1.id = T2.id; SELECT * FROM T1 WHERE id IN (SELECT id FROM T2);