Search code examples
kdb

How do I unassign variables in KDB?


Let's say I've written:

d: 3

How do I then unassign this, if I want to delete this variable?

I tried delete d and _d but neither of these worked.


Solution

  • To delete a variable from the root namespace you can use:

    delete d from `.
    

    More information can be found here: https://code.kx.com/q/ref/delete/