Jump to content

Database Table Question


hrdyzlita

Recommended Posts

Using: MySQL 5.1.36 with WAMPServer

 

I'm new to using MySQL, so sorry if I don't have terms right or if I don't explain this very well.

 

I tried to make a table and this is how it turned out.

 

wtmvk.jpg

 

My question is, is it normal for it to say NULL in the fields where I don't have any values? It just looks odd to me, so I'm not sure 100% if that correct or if I missed something.

 

The steps I followed said the following:

[*]Create a table named "stuff_in_house" and create the following columns:

column 1 = rooms  column 1: type = int

column 2 = furniture    column 2: type = text

column 3 = appliances  column 3: type = text

[*]Use the INSERT INTO command.

column 1 is value 1 = 5

column 2 is value 2 = sofa

column 3 is value = refrigerator

[*]Use INSERT INTO command for two more values for column 1 and two more values for column 2.

furniture has values of = desk, bed

appliances has values of = micrcwave, stove

Link to comment
Share on other sites

When you create the table you can set it to be "NOT NULL" which means the field is required. But if that attribute is not set, yes it is very normal unless you set a DEFAULT value to the column, at which the default value should be in that place. For more information on the Null character see this wiki page

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.