And to be clear, and to elaborate, null is the default state for a Cassandra cell if you don't write to it, so you can always create a row with a null column by writing the row without that column being specified.
Additionally, cql's delete statement optionally takes a columns argument, so if you want to set an existing column to null, just delete it. DELETE [COLUMNS] FROM <COLUMN FAMILY> [USING <CONSISTENCY>] WHERE KEY = keyname1 DELETE [COLUMNS] FROM <COLUMN FAMILY> [USING <CONSISTENCY>] WHERE KEY IN (keyname1, keyname2); -Tupshin On Mar 10, 2014 4:31 PM, "DuyHai Doan" <doanduy...@gmail.com> wrote: > @Rahul > > *Null *has a special semantics for CQL3. Setting a column value to *null > *means > deleting it... > > > On Mon, Mar 10, 2014 at 5:56 PM, Rahul Gupta <rgu...@dekaresearch.com>wrote: > >> Hi, >> >> >> >> How do I check for NULL values in CQL3? >> >> I am trying to write a CQL equivalent for below SQL: >> >> >> >> SELECT * FROM table1 WHERE col2 IS NULL; >> >> >> >> While inserting data into C*, CQL won't let me insert NULL, I have to >> pass '' for Strings and 0 for integers. >> >> I have '' and 0s as valid data so that's conflicting with fillers I have >> to use instead of NULL. >> >> >> >> Please advise. >> >> >> >> Thanks, >> >> *Rahul Gupta* >> *DEKA* *Research & Development* <http://www.dekaresearch.com/> >> >> 340 Commercial St Manchester, NH 03101 >> >> P: 603.666.3908 extn. 6504 | C: 603.718.9676 >> >> >> >> This e-mail and the information, including any attachments, it contains >> are intended to be a confidential communication only to the person or >> entity to whom it is addressed and may contain information that is >> privileged. If the reader of this message is not the intended recipient, >> you are hereby notified that any dissemination, distribution or copying of >> this communication is strictly prohibited. If you have received this >> communication in error, please immediately notify the sender and destroy >> the original message. >> >> >> >> ------------------------------ >> This e-mail and the information, including any attachments, it contains >> are intended to be a confidential communication only to the person or >> entity to whom it is addressed and may contain information that is >> privileged. If the reader of this message is not the intended recipient, >> you are hereby notified that any dissemination, distribution or copying of >> this communication is strictly prohibited. If you have received this >> communication in error, please immediately notify the sender and destroy >> the original message. >> >> Thank you. >> >> Please consider the environment before printing this email. >> > >