# `isa` statement

The statement `<VAR> isa <TYPE>` is used to identify the `<VAR>` as an instance of `<TYPE>`.

Schema for the following examples

```typeql
#!test[schema]
define
attribute name, value string;
entity person, owns name;
```

## [](#_inserting_instance_of_type)Inserting instance of type

The `isa` keyword can be used to create a new instance of a given type.

```typeql
#!test[write]
insert $person isa person;
```

## [](#_deleting_instance_of_type)Deleting instance of type

Unlike in TypeDB 2, the `isa` keyword is no longer used to delete an instance of type. Simply delete the variable that is bound to the instance.

```typeql
#!test[write]
#{{
match $person isa person;
#}}
delete $person;
```

## [](#_matching)Matching

### [](#_matching_instances_of_type)Matching instances of type

The `isa` keyword can be used to match all instances of a given type and its subtypes.

```typeql
#!test[read]
match $person isa person;
```

The `isa!` keyword can be used to match all instances of a type _excluding subtypes._

```typeql
#!test[read]
match $person isa! person;
```

### [](#_matching_types_of_an_instance)Matching types of an instance

The `isa` keyword can be used to match all types of an instance.

```typeql
#!test[read]
match $person isa $type;
```

The `isa!` keyword can be used to match the exact type of an instance.

```typeql
#!test[read]
match $person isa! $type;
```

[alias](../alias/index.md) [links](../links/index.md)

[Edit on GitHub](https://github.com/typedb/typedb-docs/edit/3.x-development/typeql-reference/modules/ROOT/pages/statements/isa.adoc) Edit this page on GitHub.