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
https://forums.phpfreaks.com/topic/188415-database-table-question/
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.