

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Is it necessary to select the database each time we begin a MySQL session? How can it be done?
The database is created only once but it is necessary to select it each time we begin a MySQL
session. It can be done with the help of USE db_name statement on MySQL command line tool.
mysql> Use Query; Database changed
It shows that we are now using query database.
We can also select the database while invoking the MySQL from Windows command line. It can be done with the help of the following command −
C:\Program Files\MySQL\bin>mysql -u root -p query Enter password: *****
Here, query is the name of the database we are going to use for current MySQL session
- Related Questions & Answers
- Can we select row by DATEPART() in MySQL? Is it possible?
- Is it necessary to add DEFAULT NULL in MySQL?
- Is it necessary to have a responsive website?
- Autoincrement in MySQL begins from 1? How can we begin it from another number?
- What is the meaning of “SELECT” statement in MySQL and how can it be used?
- Why do we cry? Can it be controlled?
- How is Session Management done in JSP?
- How can it be possible to invert a string in MySQL?
- Insert the results of a MySQL select? Is it possible?
- How can we select a MySQL database by using PHP script?
- Why is it necessary to declare NOT FOUND handler while using MySQL cursor?
- Is it necessary that a try block should be followed by a catch block in Java?
- Why is it necessary to have a girl or boyfriend in life?
- Where is the MySQL database gets saved when it is created?
- How can we modify the definition of a MySQL view without dropping it?
Advertisements