0

Does anyone know how to do this in SQL?

Step 1: Make a table in MySQL called users with 3 fields atleast.

Step 2: id is the first make it the primary and also auto_increment. username is the second. password is the third one.

If anyone does please give me the code or explain what I need to do, I would like to learn how to do it

-Thank in advance

4
  • do you have cPanel installed on your server? Commented Apr 27, 2012 at 1:17
  • google.co.uk/search?q=mysql+create+table Commented Apr 27, 2012 at 1:18
  • I do, I have php my admin as well Commented Apr 27, 2012 at 1:18
  • Thank you for the link but I want to learn how you would make the tables by the interface first then i'd understand the code if you get me :) Commented Apr 27, 2012 at 1:19

2 Answers 2

2

I think, if you would like to learn how to do it, you would be best off reading some tutorials on the subject. A quick Google for MySQL create table has plenty of suggestions.

I suspect just looking at the code will be far less instructive than working through a tutorial or reading the manual, but since you asked:

CREATE TABLE users (
    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(50),
    password VARCHAR(50)
);
Sign up to request clarification or add additional context in comments.

Comments

1

You can try creating a table in MySQL with SQL Fiddle. It's an online tool that helps with rapid prototyping...

Take a look at this fiddle: http://sqlfiddle.com/#!2/a7da8/1

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.