1

I have a Graph with the name people created inside my apache database. But now I want to update it to population

How can I do that?

Kamlesh Kumar
  • 351
  • 1
  • 7

6 Answers6

1

To rename the function from people to population, you can use the ALTER FUNCTION statement:

ALTER FUNCTION people() RENAME TO population;

This statement renames the function people to population.

After executing this statement, you should be able to call the function using its new name population(). Note that any other database objects that reference the old function name would need to be updated accordingly.

Mohayu Din
  • 433
  • 9
1

In order to change the graph name from 'people' to 'population' use alter_graph() as follows:

SELECT alter_graph('people', 'RENAME', 'population');

You can also crosscheck this by issuing the following command:

SELECT * FROM ag_graph;

The name and namespace columns should have 'population' in it

Zainab Saad
  • 728
  • 1
  • 2
  • 8
1

ALTER FUNCTION can be used to change the function name however to update the name of a graph within your Apache database from people to population, you can use following command:

SELECT alter_graph('people', 'RENAME', 'population');

For verification, you can confirm the change by running the following command:

SELECT * FROM ag_graph;
0

You can update the graph name from 'People' to 'Population' using the following query:

ALTER GRAPH people RENAME TO population;

You can also use this query:

RENAME GRAPH people TO population;
Prachi
  • 39
  • 3
-1

You can update the name of the graph using the following query:

ALTER GRAPH people RENAME TO population;

I hope it helps you.

Aadil Bashir
  • 111
  • 5
-2

SELECT alter_graph('previous_name', 'RENAME', 'new_name');

You can use this query to alter the graph name in apache age.