简体   繁体   中英

Using The Same Name For A Table As A Schema

To put it simply, will bad things happen if I use a table name which is also a schema name.

For example:

Aircraft.Aircraft

No reason why you can't do this, as far as I know, though you may confuse yourself later. I suppose things might get sticky if you wrote queries that didn't explicitly state the schema, but if you avoided doing that then you ought to be OK.

Having said that, I'd question the wisdom of doing this - to me, it suggests that either the schema name or the table name isn't properly describing what it contains.

I don't think it will cause a problem, but I don't see why you would want to do that. You should name your schema something more descriptive of what you are modeling. For example, rather than naming your schema "Aircraft" name it "Airport" or "Air_traffic" or whatever.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM