惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tailwind CSS Blog
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
The Cloudflare Blog
博客园 - 聂微东
博客园 - 司徒正美
量子位
博客园 - 三生石上(FineUI控件)
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
Apple Machine Learning Research
Apple Machine Learning Research
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
Y
Y Combinator Blog
S
SegmentFault 最新的问题
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
有赞技术团队
有赞技术团队
A
About on SuperTechFans

博客园 - moge

新建的网站 八方达物流网 How to Implement an Automatic Sliding Window in a Partitioned Table on SQL Server 2005 SQL Server 2005 Partitioned Tables and Indexes 如何估算数据库的大小 MSDN链接 Enabling Change Data Capture SQL Server 操作集锦 转一篇很经典的房价文章 在SharePoint中激活Page Library功能 计算机电子书免费下载列表 3 计算机电子书免费下载列表 2 计算机免费电子书下载 1 国外可以赚钱的免费硬盘 推荐一个下载电子书的网站 不需要注册 Javascript中的apply和call函数 ASP.NET AJAX客户端生命周期分析(实践篇)(2) 继承CollectionBase的类的xml序列化 101个设计模式 Design Patterns 用C#操作Person or Group列在SharePoint中
Database Coding Standard and Guideline
moge · 2009-04-20 · via 博客园 - moge

Object type

Prefix

Example

Primary key Clustered

pkc_

pkc_MY_TABLE__Column

Primary key Nonclustered

pkn_

pkn_TB_TABLE__Column_List

Index Clustered

ixc_

ixc_TS2_TABLE__Column

Index Nonclustered

ixn_

ixn_TB_TABLE__Column_List

Foreign key

fk_

fk_THIS_TABLE__ColumnB__to__TB_PKEY_TABLE__ColumnA

Unique Constraint

unq_

unq_TB_TABLE__Column_List

Check Constraint

chk_

chk_TB_TABLE__Column

Column Default

dft_

dft_TB_TABLE_Column_List

Passed Parameter

@p

@pPassedVariableName

Local Variable

@

@VariableName

Table

TB_, *_

TB_TABLE_NAME (see detail below)

View

VW_

VW_NET_ACTIVE_UNITS

User Defined Scalar Function

ufs_

ufs_return_value_name

User Defined Table Function

uft_

uft_TB_TABLE_NAME

Stored Procedure

*

Eds_Def (see detail below)

    • Use the following standard prefixes for scripts:

Script type

Prefix

Example

Stored procedure script

proc_

proc_Calendar.sql

Schema script

def_

def_Calender.sql

Conversion script

conv_

conv_Schedule.sql

Rollback script

rbk_

rbk_Schedule.sql

    • Save all scripts using the .sql extension
    • Use the following standard column and variable suffix abbreviations:

Object Type

Suffix

Example

Account

_Acct

Process_Corp_Acct

Address

_Addr

Contact_Addr

Amount

_Amt

Total_Credit_Amt

Balance

_Bal

Available_Bal

Date or Datetime

_Dt

Active_Dt, @Archive_Dt

Description

_Desc

Product_Desc

Date of Birth

_DOB

Alternate_DOB

Indicator

_Ind

Net_Gross_Ind

Line(n)

_Ln(n)

Address_Ln2, @pOrderLn

Number

_Nbr

Bank_Nbr

Record identifier/identity

_Id

Entity_Id, @pEntityId

Tax Id Number

_TIN

Merchant_TIN

Card Transactions

_Trans

Daily_Nbr_Trans

Zip Code

_Zip

Recipient_Zip