Welcome to the IMTalk - Internet Marketing & SEO Forum.
  • Login:
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Hussy is offline IM & SEO Quiet One Hussy is on a distinguished road
    Join Date
    Jan 2011
    Location
    Cambridge U.K.
    Posts
    11
    Thanks Given
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Ho i can create a table in data base ?

    Hi,
    all member's


    How i can create a table in data base ?




    Thank's

  2. #2
    bruceh is offline IM & SEO Quiet One bruceh is on a distinguished road
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    2
    Thanks Given
    0
    Thanked 0 Times in 0 Posts
    Hi,

    It depends on what tools you have avialable to work with. If you are using a graphica interface to a database such as phpMyAdmin then there is a simple inbuilt table creator.

    Otherwise you can always create a table using sql.

    an example sql startment to create a table is as follows :

    CREATE TABLE customer
    (First_Name varchar 50 not null,
    Last_Name varchar 50 not null,
    Address varchar 50 not null,
    City varchar 50 not null ,
    Country varchar 25 not null,
    Birth_Date date);

    I hope this helps

    Bruce

  3. #3
    Sherly is offline IM & SEO Weak Jaw Sherly is on a distinguished road
    Join Date
    May 2011
    Posts
    233
    Thanks Given
    1
    Thanked 11 Times in 9 Posts
    The SQL syntax for CREATE TABLE is

    CREATE TABLE "table_name"
    ("column 1" "data_type_for_column_1",
    "column 2" "data_type_for_column_2",
    ... )

    So, if we are to create the customer table specified as above, we would type in

    CREATE TABLE customer
    (First_Name char(50),
    Last_Name char(50),
    Address char(50),
    City char(50),
    Country char(25),
    Birth_Date date)

    Sometimes, we want to provide a default value for each column. A default value is used when you do not specify a column's value when inserting data into the table. To specify a default value, add "Default [value]" after the data type declaration. In the above example, if we want to default column "Address" to "Unknown" and City to "Texas", we would type in

    CREATE TABLE customer
    (First_Name char(50),
    Last_Name char(50),
    Address char(50) default 'Unknown',
    City char(50) default 'Texas',
    Country char(25),
    Birth_Date date)


 

Similar Threads

  1. On site SEO refers to the data you control for your web page/site
    By whitegyr in forum On-Page SEO & Content Creation
    Replies: 2
    Last Post: 03-24-2011, 10:22 AM
  2. Create Your Own Affiliate Network
    By whitegyr in forum Affiliate, CPC, CPA Programs
    Replies: 1
    Last Post: 10-26-2010, 06:55 PM
  3. How to create a paypall account
    By mohaguru in forum Legal, Copyright, Payment Processing
    Replies: 1
    Last Post: 09-07-2010, 06:04 AM

Posting Permissions

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