数据库对象 | 前缀 | 举例 |
表(Table) 列、字段(Column) 视图(View) 存储过程(Stored procedure) 触发器(Trigger) 索引(Index) 主键(Primary key) 外键(Foreign key) 规则(Rule) 用户定义数据类型(User-defined data type) 用户定义函数(User-defined function) | (无) (无) v pr tr ix pk fk rul udt fn | Student StudentID vActivity prDelOrder trOrder_D ix_CustomerID pk_Admin fk_Order_OrderType rulCheckZip udtPhone fnDueDate |
好的命名 | 不好的命名 |
@CurrentDate @ActivityCount @EquipmentType prCalculateTotalPrice | @D @ActNum @ET prRunCalc |
数据类型 | 前缀 | 举例 |
Char Varchar Nchar Nvarchar Text Ntext Datetime Smalldatetime Tinyint Smallint Int Bigint Numeric 或 Decimal Real Float Smallmoney Money Binary Varbinary Image Bit Timestamp Uniqueidentifier Sql_variant Cursor Table | chr chv chrn chvn txt txtn dtm dts iny ins int inb dec rea flt mns mny bin biv img bit tsp guid var cur tbl | @chrFirstName @chvActivity @chrnLastName @chvnLastName @txtNote @txtnComment @dtmTargetDate @dtsCompletionDate @inyActivityID @insEquipmentTypeID @intAsset @inbGTIN @decProfit @reaVelocity @fltLength @mnsCost @mnyPrice @binPath @bivContact @imgLogo @bitOperational @tspCurrent @guidOrderID @varPrice @curInventory @tblLease |
欢迎光临 MariaDB社区 (http://123.56.88.72/) | Powered by Discuz! X3.2 |