Would you want to view data like this "there was a key, which had this column , but now it does not have any value as of this time."
Unless you specifically want this information, I believe you should just delete the column, rather than have an alternate value for NULL or create a composite column. Because in cassandra that’s the way deletion is dealt with, putting NULLs is the way we deal with it in RDBMS because we have a fixed number of columns which always have to have some value, even if its NULL, and we have to have the same set of columns for every row. In Cassandara, we can delete the column, and in most scenarios that’s what we should do, unless we specifically want to preserve some history that this column was turned null at this time…Each row can have different columns. Regards, Roshni From: Edward Capriolo <edlinuxg...@gmail.com<mailto:edlinuxg...@gmail.com>> Reply-To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" <user@cassandra.apache.org<mailto:user@cassandra.apache.org>> To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" <user@cassandra.apache.org<mailto:user@cassandra.apache.org>> Subject: Re: Setting column to null Your best bet is to define the column as a composite column where one part represents is null and the other part is the data. On Friday, June 8, 2012, shashwat shriparv <dwivedishash...@gmail.com<mailto:dwivedishash...@gmail.com>> wrote: > What you can do is you can define some specific variable like "NULLDATA" some > thing like that to update in columns that does have value > > > On Fri, Jun 8, 2012 at 11:58 PM, aaron morton > <aa...@thelastpickle.com<mailto:aa...@thelastpickle.com>> wrote: > > You don't nee to set columns to null, delete the column instead. > Cheers > ----------------- > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com > On 8/06/2012, at 9:34 AM, Leonid Ilyevsky wrote: > > Is it possible to explicitly set a column value to null? > > I see that if insert statement does not include a specific column, that > column comes up as null (assuming we are creating a record with new unique > key). > But if we want to update a record, how we set it to null? > > Another situation is when I use prepared cql3 statement (in Java) and send > parameters when I execute it. If I want to leave some column unassigned, I > need a special statement without that column. > What I would like is, prepare one statement including all columns, and then > be able to set some of them to null. I tried to set corresponding ByteBuffer > parameter to null, obviously got an exception. > ________________________________ > This email, along with any attachments, is confidential and may be legally > privileged or otherwise protected from disclosure. Any unauthorized > dissemination, copying or use of the contents of this email is strictly > prohibited and may be in violation of law. If you are not the intended > recipient, any disclosure, copying, forwarding or distribution of this email > is strictly prohibited and this email and any attachments should be deleted > immediately. This email and any attachments do not constitute an offer to > sell or a solicitation of an offer to purchase any interest in any investment > vehicle sponsored by Moon Capital Management LP (“Moon Capital”). Moon > Capital does not provide legal, accounting or tax advice. Any statement > regarding legal, accounting or tax matters was not intended or written to be > relied upon by any person as advice. Moon Capital does not waive > confidentiality or privilege as a result of this email. > > > > -- > > > ∞ > > Shashwat Shriparv > > This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately. *** Walmart Confidential ***