Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Go NULL values into an index?

RE: Go NULL values into an index?

From: Alex Hillman <alex_hillman_at_physia.com>
Date: Tue, 9 Jan 2001 12:27:15 -0500
Message-Id: <10736.126176@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C07A61.6CBCC4A0

Content-Type: text/plain;

        charset="iso-8859-1"

I did not try it but this should work. Disable not null constraint, put null into the column and then enable novalidate not null constraint.

Also the only case when nuuls can be in the index if the nullable column is one of several columns on which index defined. For example if index defined on column c1 null values of c1 will not go to the index. However if index defined on (c1,c2,c3) - any combination of these columns which has at least one of columns values not null will go into the index.

Alex Hillman

-----Original Message-----

From: Jeffery Stevenson [mailto:jeff_at_mpv.com] Sent: Tuesday, January 09, 2001 10:32 AM To: Multiple recipients of list ORACLE-L Subject: RE: Go NULL values into an index?

Now why would anyone want to know a useless trick like that? :)

Besides, it would require that you have permissions to alter the constraints on the table...

Jeff

-----Original Message-----

Sent: Tuesday, January 09, 2001 12:11 AM To: Multiple recipients of list ORACLE-L

Hi Jeffery

   u meant to say that there is some way to put null values in not null column.

   Would u tell me how to do that.

 Thanks & Regards



 Ram
 Tel:4236953

Please respond to ORACLE-L_at_fatcity.com

To: ORACLE-L_at_fatcity.com
cc:

AHA! It's a trick question...you shouldn't be able to put null values in a not null field--not to say that it can't be done, but that is beyond the scope of this question. :) Just so we get this right, it is supposed to be a nullable column, right?

Jeffery Stevenson
Chief Databeast Tamer, late at night with a tummy full of Coronas! Medical Present Value, Inc.
Austin, TX

-----Original Message-----

[mailto:Andreas.Haunschmidt_at_voest.co.at] Sent: Monday, January 08, 2001 9:50 PM
To: Multiple recipients of list ORACLE-L

Hi Board Members!
 Maybe a often posed question,
 but I dare to ask you directly:

 If there is a not null column named 'c1' and  this column is part of an index

 Andreas
  Andreas
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Haunschmidt Andreas VASL/FAS
  INET: Andreas.Haunschmidt_at_voest.co.at

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Jeffery Stevenson
  INET: jeff_at_mpv.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: ramakrishna.gv_at_db.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Jeffery Stevenson
  INET: jeff_at_mpv.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

------_=_NextPart_001_01C07A61.6CBCC4A0

Content-Type: text/html;

        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2448.0">
<TITLE>RE: Go NULL values into an index?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>I did not try it but this should work. Disable not = null constraint, put null into the column and then enable novalidate = not null constraint.</FONT></P>

<P><FONT SIZE=3D2>Also the only case when nuuls can be in the index if = the nullable column is one of several columns on which index defined. = For example if index defined on column c1 null values of c1 will not go = to the index. However if index defined on (c1,c2,c3) - any combination = of these columns which has at least one of columns values not null will = go into the index.</FONT></P>

<P><FONT SIZE=3D2>Alex Hillman</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>From: Jeffery Stevenson [<A = HREF=3D"mailto:jeff_at_mpv.com">mailto:jeff_at_mpv.com</A>]</FONT>

<BR><FONT SIZE=3D2>Sent: Tuesday, January 09, 2001 10:32 AM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Subject: RE: Go NULL values into an index?</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Now why would anyone want to know a useless trick = like that?&nbsp;&nbsp; :)</FONT>
</P>

<P><FONT SIZE=3D2>Besides, it would require that you have permissions = to alter the constraints</FONT>
<BR><FONT SIZE=3D2>on the table...</FONT> </P>

<P><FONT SIZE=3D2>Jeff</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>Sent: Tuesday, January 09, 2001 12:11 AM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Hi Jeffery</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp; u meant to say that there is some way = to put null values in not null</FONT>

<BR><FONT SIZE=3D2>column.</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp; Would u tell me how to do that.</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;Thanks &amp; Regards</FONT>
<BR><FONT SIZE=3D2>&nbsp;----------------------------</FONT>
<BR><FONT SIZE=3D2>&nbsp;Ram</FONT>
<BR><FONT SIZE=3D2>&nbsp;Tel:4236953</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>---------------------------------------- Message =
History</FONT>
<BR><FONT SIZE=3D2>----------------------------------------</FONT>
</P>

<BR>
<BR>

<P><FONT SIZE=3D2>Please respond to ORACLE-L_at_fatcity.com</FONT> </P>

<P><FONT SIZE=3D2>To:&nbsp;&nbsp; ORACLE-L_at_fatcity.com</FONT>
<BR><FONT SIZE=3D2>cc:</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>AHA!&nbsp; It's a trick question...you shouldn't be = able to put null values in a</FONT>
<BR><FONT SIZE=3D2>not null field--not to say that it can't be done, = but that is beyond the</FONT>
<BR><FONT SIZE=3D2>scope of this question.&nbsp; :)&nbsp; Just so we = get this right, it is supposed to be</FONT> <BR><FONT SIZE=3D2>a nullable column, right?</FONT> </P>

<P><FONT SIZE=3D2>Jeffery Stevenson</FONT> <BR><FONT SIZE=3D2>Chief Databeast Tamer, late at night with a tummy = full of Coronas!</FONT>

<BR><FONT SIZE=3D2>Medical Present Value, Inc.</FONT>
<BR><FONT SIZE=3D2>Austin, TX</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>[<A =
HREF=3D"mailto:Andreas.Haunschmidt_at_voest.co.at">mailto:Andreas.Haunschmi= dt_at_voest.co.at</A>]</FONT>

<BR><FONT SIZE=3D2>Sent: Monday, January 08, 2001 9:50 PM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Hi Board Members!</FONT>
<BR><FONT SIZE=3D2>&nbsp;Maybe a often posed question,</FONT>
<BR><FONT SIZE=3D2>&nbsp;but I dare to ask you directly:</FONT> </P>

<P><FONT SIZE=3D2>&nbsp;If there is a not null column named 'c1' = and</FONT>
<BR><FONT SIZE=3D2>&nbsp;this column is part of an index</FONT> <BR><FONT SIZE=3D2>&nbsp;- eg.: create (unique) index idx1 on = t1(c1,c2...) -</FONT>
<BR><FONT SIZE=3D2>&nbsp;will the null values &quot;go&quot; into the = index, so that a</FONT>

<BR><FONT SIZE=3D2>&nbsp;select * from t1 where c1 is null;</FONT>
<BR><FONT SIZE=3D2>&nbsp;or any other select statement</FONT>
<BR><FONT SIZE=3D2>&nbsp;can make use of the index ?</FONT>
<BR><FONT SIZE=3D2>&nbsp;Thanks in advance!</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;Andreas</FONT>
<BR><FONT SIZE=3D2>&nbsp; Andreas</FONT>
<BR><FONT SIZE=3D2>--</FONT>
<BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A = HREF=3D"http://www.orafaq.com" =
TARGET=3D"_blank">http://www.orafaq.com</A></FONT>
<BR><FONT SIZE=3D2>--</FONT>
<BR><FONT SIZE=3D2>Author: Haunschmidt Andreas VASL/FAS</FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: Andreas.Haunschmidt_at_voest.co.at</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) = 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT =

SIZE=3D2>---------------------------------------------------------------=

-----</FONT>

<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = 'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB = ORACLE-L</FONT>
<BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed = from).&nbsp; You may</FONT>
<BR><FONT SIZE=3D2>also send the HELP command for other information = (like subscribing).</FONT>
<BR><FONT SIZE=3D2>--</FONT>
<BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A = HREF=3D"http://www.orafaq.com" =
TARGET=3D"_blank">http://www.orafaq.com</A></FONT>
<BR><FONT SIZE=3D2>--</FONT>
<BR><FONT SIZE=3D2>Author: Jeffery Stevenson</FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: jeff_at_mpv.com</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) = 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT =

SIZE=3D2>---------------------------------------------------------------=

-----</FONT>

<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = 'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB = ORACLE-L</FONT>
<BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed = from).&nbsp; You may</FONT>
<BR><FONT SIZE=3D2>also send the HELP command for other information = (like subscribing).</FONT>
</P>
<BR>
<BR>
<BR>

<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A = HREF=3D"http://www.orafaq.com" =
TARGET=3D"_blank">http://www.orafaq.com</A></FONT>

<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: </FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: ramakrishna.gv_at_db.com</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) = 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT =

SIZE=3D2>---------------------------------------------------------------=

-----</FONT>

<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = 'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB = ORACLE-L</FONT>
<BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed = from).&nbsp; You may</FONT>
<BR><FONT SIZE=3D2>also send the HELP command for other information = (like subscribing).</FONT>
<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A = HREF=3D"http://www.orafaq.com" =
TARGET=3D"_blank">http://www.orafaq.com</A></FONT>
<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: Jeffery Stevenson</FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: jeff_at_mpv.com</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) = 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT =

SIZE=3D2>---------------------------------------------------------------=

-----</FONT>

<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = Received on Tue Jan 09 2001 - 11:27:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US