SQL Table Naming Convention

  • We all have our own naming conventions that make sense to us or have been implemented by others before us. And when it comes to naming stored procedures many SQL Server developers know that it is not wise to prefix stored procedures with "sp_".

    When I recently looked at one of our production databases I noticed a user table that was prefixed with "sys". Does anyone know if there is a downside to naming user tables with the prefix "sys"?

    Thank you in advance.

  • You mean besides the utter confusion it would create...:D

  • Sounds like a good way to hide something... 😎

  • create table

    (

    [COLUMN] int not null

    constraint [PRIMARY_KEY] primary key ([COLUMN])

    )

  • If you really want to drive a DBA insane...

    CREATE TABLE [[dbo.[[[.[,] (

    [.[,[,] INT,

    [Max([.[,[,)] VARCHAR(10)

    )

    GO

    SELECT [.[,[,], [Max([.[,[,)] FROM dbo.[[dbo.[[[.[,]

    Yes, it's valid.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • So basically, it just should not be done for control, organization, and sanity sake within the structured environment that we so like to construct for ourselves, but does not have a downside performance hit or otherwise cause confusion for SQL Server's query engine.

  • As far as I know and the tests done with the profiler, it shouldnt e an issue. Except that it could drive you nuts...;)

    -Roy

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply