<p>I have a database called foo and a database called bar. I have a table in foo called tblFoobar that I want to move (data and all) to database bar from database foo. What is the SQL statement to do this?</p>

On SQL Server? and on the same database server? Use three part naming.
```
```
INSERT INTO bar..tblFoobar( *fieldlist* )
SELECT *fieldlist* FROM foo..tblFoobar
```
```
This just moves the data.  If you want to move the table definition (and other attributes such as permissions and indexes), you'll have to do something else.