That’s one solution… the other is to use USE – all I’mĪdding to the code below is ‘ USE butter ’Īll queries after USE will assume the database specified if The error message here informs that you can set a default I intentionally run SELECT without including the schema name to show the error. Each statement I run must to include the schema name ( butter)… In MySQL Workbench below, I create a new database/table and is used to set your statements to use the specifiedĭatabase as your default (current) database.
For example, use finance_database overįinance_Database… or FINANCE_DATABASE may also be fine. Now here’s an example of the same on Linux using the MySQL Command-LineĬreate new table using a Capital letter onĪ common best practise is to stick to the one case for
#CREATING A TABLE IN MYSQL INSTALL#
Below, I’m creating a database on a local MySQL install (Windows 10) and then create a table within it using a Capital letter on the schema/database name.
If you’re instance running on Linux, database names are case sensitive, whereas on Windows this isn’t an issue. To the left and open up your new ‘database’. This example is using the GUI option, MySQL WorkBench.Īfter running the above, refresh Schemas within the Navigator Same command as other database software, CREATE The syntax a simple – creating a MySQL Database uses the This is a post on creating databases/tables in MySQL on both Windows and Linux, with added tips to help with general usage.