![]() ![]() Pretty straight forward, you'll notice that the user_id column has a few extra things added to it in the creation script. User_id int(11) auto_increment primary key , We're going to create two tables Users and Address, these tables have a one-to-many relationship. ![]() As I mentioned above, make sure to play the podcast episode which is embedded into this post at the very top, you'll learn a lot about the code that I'm about to write. Next up is creating tables inside our new database. So all that's going on here is that we're creating a new database, and it will be named test123, piece of cake! Once we run that code, we'll be ready to start creating tables inside of our new database. ![]() Before we create a table, we need to create a database! Thankfully this is simple, all you need to do is write a one line script and run it within your database management application (i.e. Once you've got your database installed and you've got your database management application up and running, it's time to create your first database table. I'd highly recommend watching this video even if you don't plan on using TOAD. I even created a simple step by step video tutorial on how to install a database and set up the TOAD program. I like to use TOAD for MySQL but it's obviously up to you which application you want to use. How to Create a MySQL Databaseįirst thing is first, you need to make sure you've got some sort of application that you can use to manage your databases and your queries. So that's what today's podcast is all about, be sure to click the play button above this to listen to the show and then follow along with the notes below. You've learned all about how to create sql queries to read, write, update and delete data… but you haven't yet learned how to create the tables where you'll be doing the reading, writing, updating and deleting. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |