保留供数据库系统使用的表 [英] Tables reserved for use by database system

查看:84
本文介绍了保留供数据库系统使用的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法找到保留供数据库系统使用的表格。



我尝试了什么:



搜索保留哪些表供数据库系统使用,SQL保留数据库,数据库系统保留数据库。我已经尝试了这些和其他一些,并且无法找到保留的表我是SQL的新手。真的不想要一个确切的答案,但我应该搜索什么,在哪里?



谢谢

Unable to find the tables reserved for use by the Database system.

What I have tried:

Searched "What Tables are reserved for use by database system", "SQL Reserved Databases", "Database system reserved databases." I've tried these and some others and have not been able to find the tables that are reserved I am new to SQL. Do not really want an exact answer, but what should I search and where?

Thank you

推荐答案

这取决于使用的数据库引擎,因此通常无法回答。



以MySQL为例,有 MySQL :: MySQL 5.7参考手册:: 5.3 mysql系统数据库 [ ^ ]包含系统表和 MySQL :: MySQL 5.7参考手册:: 24 INFORMATION_SCHEMA表 [ ^ ]。



MS Access系统表名称以MSys开头。因此,请避免使用此类名称。



无论如何,您只需尝试创建一个表。如果失败并且存在已存在的错误,那么您知道这是一个系统表(至少是一个空数据库)。



在任何情况下都应避免使用保留关键字作为表名。使用此类时,必须在查询字符串中引用或查找。对于MySQL: MySQL :: MySQL 5.5参考手册:: 9.3关键字和保留字 [ ^ ]。



有关多个数据库引擎的保留字列表,请参阅 SQL保留字列表 [ ^ ]
This depends on the used database engine and can't be therefore answered generally.

With MySQL for example, there are the MySQL :: MySQL 5.7 Reference Manual :: 5.3 The mysql System Database[^] containing the system tables and the MySQL :: MySQL 5.7 Reference Manual :: 24 INFORMATION_SCHEMA Tables[^].

MS Access system table names begin with "MSys". So just avoid using such names.

In any case you can simply try to create a table. If that fails with an exists already error you know that is is a system table (at least with an empty database).

In any case you should avoid using reserved keywords as table names. When using such they must quoted or esacped within query strings. For MySQL: MySQL :: MySQL 5.5 Reference Manual :: 9.3 Keywords and Reserved Words[^].

For a list of reserved words of multiple database engines see List of SQL reserved word[^]


这篇关于保留供数据库系统使用的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆