You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/queries/select-version.adoc
+62-3Lines changed: 62 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,18 +37,77 @@ Databases created on, or migrated to, Neo4j 2025.06 or later will continue to ha
37
37
This is true for link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/#manage-database-systems[system, standard, and composite] Neo4j databases.
38
38
However, it is possible to set a different default language on both new and existing system, standard, and composite databases.
39
39
40
-
For more information about how to change and view the default language of new and existing databases and remote database aliases, and for how to set the necessary privilege to change the default language of a standard or composite database, see the following links in the Operations Manual:
40
+
To select a default Cypher version when creating a database, add `DEFAULT LANGUAGE <language version>` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/[`CREATE DATABASE`] statement.
41
+
42
+
.Select default Cypher version when creating a database
43
+
[.tabbed-example]
44
+
=====
45
+
[.include-with-Cypher-25]
46
+
======
47
+
48
+
.Cypher 25
49
+
[source,cypher]
50
+
----
51
+
CREATE DATABASE actors DEFAULT LANGUAGE CYPHER 25
52
+
----
53
+
54
+
======
55
+
[.include-with-Cypher-5]
56
+
======
57
+
58
+
.Cypher 5
59
+
[source,cypher]
60
+
----
61
+
CREATE DATABASE movies DEFAULT LANGUAGE CYPHER 5
62
+
----
63
+
64
+
======
65
+
=====
66
+
67
+
To alter the default Cypher version on an existing database, add `SET DEFAULT LANGUAGE <language version>` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/[`ALTER DATABASE`] command.
68
+
69
+
.Alter the default Cypher version on an existing database
70
+
[.tabbed-example]
71
+
=====
72
+
[.include-with-Cypher-25]
73
+
======
74
+
75
+
.Cypher 25
76
+
[source,cypher]
77
+
----
78
+
ALTER DATABASE movies SET DEFAULT LANGUAGE CYPHER 25
79
+
----
80
+
81
+
======
82
+
[.include-with-Cypher-5]
83
+
======
84
+
85
+
.Cypher 5
86
+
[source,cypher]
87
+
----
88
+
ALTER DATABASE actors SET DEFAULT LANGUAGE CYPHER 5
89
+
----
90
+
91
+
======
92
+
=====
93
+
94
+
Selecting `CYPHER 25` ensures that all queries run on that database will be executed using Cypher 25 as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.06 or later (unless a query is prepended with xref:selection-query-cypher-version[`CYPHER 5`], which overrides this default).
95
+
96
+
Selecting `CYPHER 5` as the default database language ensures that all queries run on that database uses Cypher 5 as it existed at the time of the Neo4j 2025.06 release (unless a query is prepended with xref:selection-query-cypher-version[`CYPHER 25`], which overrides this default).
97
+
Any changes introduced after the 2025.06 release will not affect the semantics of the query.
98
+
99
+
For more information about how to change and view the default language of new and existing databases and remote database aliases, and for how to set the necessary privileges to change the default language of a database, see the following links in the Operations Manual:
41
100
42
101
* link:{neo4j-docs-base-uri}/operations-manual/current/configuration/cypher-version-configuration/[Configure the Cypher default version]
43
102
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#_set_a_default_cypher_version_for_a_standard_database[Set a default Cypher version for a standard database]
44
103
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/create-composite-databases/#composite-databases-default-language[Set a default Cypher version for a composite database]
45
104
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#set-default-language-for-remote-database-aliases[Set a default Cypher version for remote database aliases]
46
105
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/#alter-database-default-language[Alter the default Cypher version of an existing database]
47
-
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/alter-composite-databases/#_alter_the_default_cypher_version_of_a_composite_database[Alter the default Cypher version of a composite database]
106
+
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/alter-composite-databases/#alter-default-language-composite-database[Alter the default Cypher version of a composite database]
48
107
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#alter-default-language-remote-database-alias[Alter the default Cypher version of a remote database alias]
49
108
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/listing-databases/#_show_the_default_cypher_version_of_a_database[Show the default Cypher version of a database]
50
109
* link:{neo4j-docs-base-uri}/operations-manual/authentication-authorization/dbms-administration/#_grant_privilege_to_modify_the_default_language_of_standard_databases[Grant privilege to modify the default language of standard databases]
51
-
* * link:{neo4j-docs-base-uri}/operations-manual/authentication-authorization/dbms-administration/#_grant_privilege_to_modify_composite_databases[Grant privilege to modify composite databases] (required in order to alter the default language of a composite database)
110
+
* link:{neo4j-docs-base-uri}/operations-manual/authentication-authorization/dbms-administration/#_grant_privilege_to_modify_composite_databases[Grant privilege to modify composite databases] (required in order to alter the default language of a composite database)
52
111
53
112
For information about Cypher versions and DBMS upgrades, see the link:{neo4j-docs-base-uri}/upgrade-migration-guide/current/_cypher_versions[Upgrade and migration guide -> Cypher versions].
0 commit comments