leegold2 wrote:
General DB questions,
Why do we use null values? Why is it better than an empty field?
What would be a real life situation were nulls are important to
have?
If I have a paragraph of text in a field of data type: TEXT. Can I
search in this field? Maybe i mean, could i use SELECT on a table
and get rows on the basis of a string or substring in the TEXT
field?
Thanks,
Lee G.
Null really means empty.
Real Life Situation: In a numeric field where you need both zero and
null. Let’s say you are measuring temprature, zero would be a
temprature but null could mean that you have not taken a measurement
for that row.
You can substring search using LIKE (read in any sql book). You can
also do freetext search which is a lot faster for larger db’s, since
the text is indexed for substring searches.
--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL:
http://www.dbForumz.com/mySQL-DB-nul...ict121588.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.dbForumz.com/eform.php?p=405024