Copying certain rows from one database to another

What is the best way to copy firstname, lastname from the users table in a database called oils over to the contacts table in the edownline database?

Thank you!

If you have a user that can connect to both databases then


insert into edownline (firstname, lastname)
select
firstname, lastname
from
oils

what he said, except with proper database qualification on the table names

INSERT
  INTO [COLOR="Blue"]edownline.contacts[/COLOR]
     ( firstname
     , lastname )
SELECT firstname
     , lastname
  FROM [COLOR="blue"]oils.users[/COLOR]

r937, how come this query didn’t work?

INSERT
  INTO convert2silver.people
     ( IPaddress
     , dateAdded
     , firstName
     , lastname
     , city
     , state
     , zip
     , country
     , email
     , career
     , referURL)
SELECT IPaddress
     , date
     , firstname
     , lastname
     , city
     , state
     , zip
     , country
     , email
     , member
     , referURL
  FROM oils.users
WHERE wantSilver = 'Yes';

I didn’t get an error message or anything.

Most likely cause would be that there are no entries where “wantSilver” is “Yes”.

Are you running this in something like MySQL Workbench? If so, does it tell you have many rows are affected? Also, try just the select portion by itself and see what results you get.

Yes, I am using mySQL Workbench. I don’t understand why I’m getting the following error. I checked that all permissions are granted to this user. Any ideas?

Thanks!

Error Code: 1142
INSERT command denied to user ‘recordAdmin’@‘208.255.33.1’ for table ‘people’