Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INSERT/UPDATE full row without specification

Status
Not open for further replies.

Laffern

Programmer
Joined
Dec 6, 2004
Messages
18
Location
AT
While I can read a whole row of a database table with SELECT *, how it works with pushing data into Tables ?

Actually, I read row from an external server and want push it into my local database. Both databases, the server and mine have the same table schema already. Due to the number of columns (more than 100) it can be time-consuming reading each column.

Thanks, in advance.
 
Typically:
Code:
INSERT INTO <targettable>
SELECT *
FROM <sourcetable>
WHERE blah blah
... or if target table doesn't exist:
Code:
SELECT *
INTO <targettable>
FROM <sourcetable>
WHERE blah blah
This construct is also known as singleton SELECT.

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top