No cache version.

Caching disabled. Default setting for this page:enabled (code DEF204)
If the display is too slow, you can disable the user mode to view the cached version.

Rechercher dans le manuel MySQL

27.4.4.1 The create_synonym_db() Procedure

Given a schema name, this procedure creates a synonym schema containing views that refer to all the tables and views in the original schema. This can be used, for example, to create a shorter name by which to refer to a schema with a long name (such as info rather than INFORMATION_SCHEMA).

Parameters
  • in_db_name VARCHAR(64): The name of the schema for which to create the synonym.

  • in_synonym VARCHAR(64): The name to use for the synonym schema. This schema must not already exist.

Contents Haut

Example
  1. mysql> SHOW DATABASES;
  2. +--------------------+
  3. | Database           |
  4. +--------------------+
  5. | information_schema |
  6. | mysql              |
  7. | performance_schema |
  8. | sys                |
  9. | world              |
  10. +--------------------+
  11. mysql> CALL sys.create_synonym_db('INFORMATION_SCHEMA', 'info');
  12. +---------------------------------------+
  13. | summary                               |
  14. +---------------------------------------+
  15. | Created 63 views in the info database |
  16. +---------------------------------------+
  17. mysql> SHOW DATABASES;
  18. +--------------------+
  19. | Database           |
  20. +--------------------+
  21. | information_schema |
  22. | info               |
  23. | mysql              |
  24. | performance_schema |
  25. | sys                |
  26. | world              |
  27. +--------------------+
  28. mysql> SHOW FULL TABLES FROM info;
  29. +---------------------------------------+------------+
  30. | Tables_in_info                        | Table_type |
  31. +---------------------------------------+------------+
  32. | character_sets                        | VIEW       |
  33. | collation_character_set_applicability | VIEW       |
  34. | collations                            | VIEW       |
  35. | column_privileges                     | VIEW       |
  36. | columns                               | VIEW       |
  37. ...

Find a PHP function

Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-sys-create-synonym-db.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:en Manuel MySQL : https://dev.mysql.com/

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut