PowerDesigner設定預設值名稱規則

2022-02-23 08:09:47 字數 1066 閱讀 5814

一、需求背景: 使用powerdesigner建立表時,若設定某列預設值時,自動生成規則的預設值名稱。比如說:df_表名_列名

二、設定步驟:

1.選擇database—>edit current dbms

2.選擇scripts-》objects-》column-》add

3.把value 替換成以下內容即可:

%20:column% [%compute%?as [(]%compute%[)]:[%.l:datatype%=xml?xml[%xmlschemacollection%?([%contenttype% ]%xmlschemacollection.generatedname%): ]:%20:datatype%][.z:[ collate %extcollation%][%.lq:datatype%="varbinary(max)"?[%filestream%? filestream]][%extrowguidcol%? rowguidcol][%mandatory%?:[%sparse%? sparse]][%identity%? %identity%[[(%extidentityseedinc%)][%extidtnotforreplication%? not for replication]]:[%extnullconstname%? constraint %extnullconstname%][ %null%][ %notnull%]][[%extdeftconstname%? [ constraint %extdeftconstname%]:[ constraint df_%table%_%column%]] default %default%]]

[%constdefn%]]

三、具體分析:很簡單的三目表示式

[[%extdeftconstname%? [ constraint %extdeftconstname%]:[ constraint df_%table%_%column%]]

%extdeftconstname% 預設值名稱 ;

%table%表名

%column%列名

%owner% 架構名稱 (想把預設值設定成df_架構_表名_列名,就把這個加上)

PowerDesigner 基本設定

今天要設計模型,開啟powerdesigner 開始設計,突然忘記了使用,哎呀看來真是老了,幾天沒有就記不住了,看來還是要做乙個筆記,隨時記錄一下,忘了好看看。樣式設計,我使用這種設計工具要有自己的風格 1.進入tools display preferences format reference 進...

PowerDesigner的樣式設定

pd提供了強大的配置功能,可以對生成的資料庫物件命名 資料模型的展現進行設定。這裡首先講下樣式的設定。顏色和字型設定 1.單獨設定某個物件的顏色和字型 1.1修改實體填充色 1 單擊選中某個需要修改填充色的實體。2 右擊,在彈出式選單中選擇 format 選項,系統將彈出格式化視窗。3 切換到 fi...

PowerDesigner引數設定

在檢視中同時顯示columns的name和code欄位 1 工具 tools 顯示引數設定 display preferences 2 在彈出來的框中選中content table 3 點右下角那個advanced 按鈕 4 在彈出的框個選中 columns 5 點listcolumns右邊的按鈕 ...