I have a table, with autoincremented id

    name VARCHAR(30) NOT NULL,
    PRIMARY KEY (id)

I can add a new item there with an explicit id

INSERT INTO users (id, name) VALUES (2, 'fred')

And while my id is autoincremented, I can omit it

INSERT INTO users (name) VALUES ('ed')

So, this time, I don't know the id, and I want to somehow get it.

I could do it with LAST_IDENTITY() function, but it just uses %RowID, and have no relation to the primary id

0 12
0 322

There are several great articles in the community showing how to use Jupyter and InterSystems IRIS together, and I encourage you to check them out in the link at the end of this article for more in depth understanding.

This is just another one, the difference is on the simplicity. Do you want to just start a container where Jupyter is already connected to an IRIS instance? Then this is for you!

1 2
0 320

I have table

        name VARCHAR(50) NOT NULL, 
        parent VARCHAR(50), 
        PRIMARY KEY (name), 
        FOREIGN KEY(parent) REFERENCES nodes (name) ON UPDATE cascade

I put some data

INSERT INTO nodes (name, parent) VALUES ('n1', NULL);
INSERT INTO nodes (name, parent) VALUES ('n11', 'n1');
INSERT INTO nodes (name, parent) VALUES ('n12', 'n1');
INSERT INTO nodes (name, parent) VALUES ('n13', 'n1');

Let's delete all


Nope, no way.

SQL Error [124] [S1000]: [SQLCODE: <-124>:<FOREIGN KEY constraint failed referential check upon DELETE of row in referenced table>]
[Location: <ServerLoop>]
[%msg: <At least 1 Row exists in table 'SQLUser.nodes' which references key 'NODESPKey2' - Foreign Key Constraint 'NODESFKey3', Field(s) 'parent' failed on referential action of NO ACTION>]

0 6
0 203
   _________ ___ ____  
  |__  /  _ \_ _|  _ \ 
    / /| |_) | || |_) |
   / /_|  __/| ||  __/ 
  /____|_|  |___|_|    

Starting in version 2021.1, InterSystems IRIS began shipping with a python runtime in the engine's kernel. However, there was no way to install packages from within the instance. The main draw of python is its enormous package ecosystem. With that in mind, I introduce my side project zpip, a pip wrapper that is callable from the iris terminal.

5 5
1 174