- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
MYSQL - select database?
152 Lectures 16 hours
87 Lectures 5.5 hours
Whenever you get MySQL - selected database, that means you need to select database. The USE command is what you should focus on in this case. The syntax is as follows −
The example of USE database is as follows. Suppose, I am creating a table and I haven’t selected any database before, then in this type of situation, select database, else an error will arise. Here is the demo.
mysql> create table Demoofselectdatabase -> ( -> Id int -> ); ERROR 1046 (3D000): No database selected
Then you can work with the ‘USE’ command. The query is as follows −
mysql> use business; Database changed
Now, you are in a situation to create tables in the database “business”.
- Select two random rows in a MySQL database?
- Which PHP function is used to select a MySQL database?
- How to select first 10 elements from a MySQL database?
- How to select a random record from a MySQL database?
- How can we select a MySQL database by using PHP script?
- Select some data from a database table and insert into another table in the same database with MySQL
- MySQL select only duplicate records from database and display the count as well?
- After connecting to MySQL server how can we select a database from command prompt?
- How to select or, shift to another database in MySQL using a JDBC API?
- How do I select four random tables from a MySQL database having thousands of tables?
- MySQL Select IN range?
- Select into in MySQL?
- MySQL Select Multiple VALUES?
- What are MySQL database engines?
- Fix MySQL Database Error #1064?