Back to the month index |
Back to the list index
|
Chris Lambrou (chrislambrou@internetmci.com)
Thu, 17 Apr 1997 09:24:14 -0400
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Laurent Zanoni: "[mSQL] mSQL: (newbie) date as fieldname?"
- Previous message: Thomas Greig: "[mSQL] date/time/indexed counter"
Date: Thu, 17 Apr 1997 09:24:14 -0400 From: Chris Lambrou <chrislambrou@internetmci.com> Subject: Re: [mSQL] "not null" Message-Id: <3.0.1.32.19970417092414.0082bf28@mail58.internetmci.com>Nathan,
>I'm new to mSQL and am wondering
>about the 'not null' statement,
>when creating a table?
>What does it mean? Also, what's everyones
Nulls are a way of storing information into a table that basically means
"Nothing" or "Don't Know the value".
For example, say you have table "product" with a fields "productid"
(Primary Key), "product_description", and "price" in which you are storing
product information. Say you have several products that you do not know
the price yet, but you want to store them to the database anyway. If the
"price" field does NOT allow nulls, then you'll have to store value 0. But
the price of the product is not $0, you just don't know yet. Therefore
this field should allow nulls. But if you don't want to allow records of
products without a price to be saved to the database, then the field should
not allow nulls.
Field "product_description" most probably would not allow nulls. What's
the point of having a product without a meaningful name?
In relational databases there are some cases where Nulls are not allowed no
matter what. For example, the primary key of a table should never be null,
since it is the value that uniquely identifies a record. Therefore field
"productid" should not and cannot allow nulls.
>suggestion for a good mSQL management environment? Thanks!!
What do you mean "management environment"?
Hope this helped,
Chris
At 02:35 PM 4/16/97 -0800, you wrote:
>Good Afternoon Everyone!
>
> I'm new to mSQL and am wondering about the 'not null' statement,
>when creating a table? What does it mean? Also, what's everyones
>suggestion for a good mSQL management environment? Thanks!!
>
> Nathan Middleton
>
>
>--------------------------------------------------------------------------
>To remove yourself from the Mini SQL mailing list send a message containing
>"unsubscribe" to >"unsubscribe" to msql-list-request@bunyip.com. Send a message containing
>"info msql-list" to majordomo@bunyip.com for info on monthly archives of
>the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
>
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: Laurent Zanoni: "[mSQL] mSQL: (newbie) date as fieldname?"
- Previous message: Thomas Greig: "[mSQL] date/time/indexed counter"