Reputation: 45
I have installed mysql. I have one database called first.db in c:\mysql. In dos prompt I switched to c:\mysql. In mysql prompt I issued select * from firstable;
I get the error message-No database selected. How to solve it. Thanks in advance.(firstable is a table in first.db).
Upvotes: 0
Views: 55
Reputation: 288
You can set the active database by this command.
Use nameofdatabase;
Or modify your query to
SELECT * FROM nameofdatabase.table
Upvotes: 1
Reputation: 1272
You need to tell MySQL which database to use :
USE database_name;
Upvotes: 2