SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2011
    Posts
    97
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Making a Simple Table

    Hey, I was just wondering how I could go about making a simple MySQL table with 3 columns, i.d (#), first name, and last name?

    It's for practice, and I can figure it out easily on MS access, but not MySQL. What is the best way to create tables in a MySQL database, I'm a new user

    Basically, something like this, but in a MySQL table;

    I.D | First Name | Last Name

    1 | John | Doe

    etc


    Elementax

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,215
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    run this query --
    Code:
    CREATE TABLE simple
    ( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT
    , firstname VARCHAR(99)
    , lastname VARCHAR(99)
    );
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you haven't done it already, read through the tutorial in the MySQL manual. Chapter #3.

    It will help you get familiar with this database app if you are going to use it.

  4. #4
    SitePoint Enthusiast
    Join Date
    Aug 2011
    Posts
    97
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I was just confused about one thing (I may be realllllly off, but please let me know).

    In order to view my tables, etc, I must be running mysql server on either my PC (local) or my webhost if I were to upload it, correct?

  5. #5
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you have to be running it on your PC or host. The host most likely WILL NOT allow you to install it, they would either provide it or not. If you find a host that doesn't provide mysql, keep looking for a better host.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •