如果你只是偶尔用下,建议用:select * from database1.dbo.table长期使用的话,在程序的连接代码指定好:如二楼:SqlConnection mysql = new SqlConnection("data source=localhost;integrated security=true;initial catalog= database1");