MySQL Select and Tables

62 views Asked by At

I am currently learning MySQL for Java to integrate to one of my projects. Main reason behind this is because currently I'm using files to store data, which is causing lag. After speaking to a few people most of them said switching to MySQl rather than files to handle data will fix that issue. Anyways, I'm confused on a few things in MySQL and was hoping somebody could answer them for me. Firstly, called the SELECT method, how exactly will that work? If I do something like this:

ResultSet res = statement.executeQuery("SELECT * FROM tokens WHERE PlayerName = "" + name + "';"); res.next();

Will that get me all the results for tokens db under the name column? If that's the case how would I then get the actual token amount? Also how would I create different databases, for example for the players score, tokens, kills, deaths, etc.

Thank you, and hopefully this wasn't to nooby of a question :P

0

There are 0 answers