Hammons,
Wednesday, October 16, 2002, 4:57:10 PM, you wrote:

HRGS6AS> I have a table named projects. Within that table, one specific column is
HRGS6AS> called costing and is of the following schema (projects float(8,2)). Nothing
HRGS6AS> fancy. The interface that updates information to this table where the column
HRGS6AS> (projects) resides in via a php web script. Within that script it is
HRGS6AS> optional to the user as to whether they want to insert costing information
HRGS6AS> at this time. The problem lies with what mysql does at that point. If the
HRGS6AS> user provides no cost info, it simply inserts a default value of "0.00".
HRGS6AS> Thus when a query like (select * from projects) is executed, the costing
HRGS6AS> column shows "0.00". I would rather it come up blank than show "0.00". I've
HRGS6AS> tried everything I can think of to insert a NULL into that column but my
HRGS6AS> syntax must be wrong. 2 questions: 
HRGS6AS> 1) What is a syntax example for inserting a NULL into a column? 

INSERT INTO table_name(column) VALUES(NULL)

HRGS6AS> 2) If a NULL is inserted into a column with a float type, does that NULL
HRGS6AS> show up as anything else other than NULL? Like my 0.00 for example. Is that
HRGS6AS> actually mysql's way of showing a NULL for that data type?

No, if column can have NULL values (not defined as NOT NULL).



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ma02-010c
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to