TEST
2018年6月26日 星期二
2018年6月14日 星期四
2018年6月13日 星期三
[DB] Informix System Columns 應用
select * from SYSTABLES, SYSCOLUMNS
where tabname your condition
and SYSTABLES.tabid = SYSCOLUMNS.tabid
因為工作環境關係, 用WHERE 條件式的JOIN 語法.
Column | Type | Explanation |
---|---|---|
colname | VARCHAR(128) | Column name |
tabid | INTEGER | Identifying code of table containing the column |
colno | SMALLINT | Column number
The system sequentially assigns this (from left to right within each table).
|
coltype | SMALLINT | Code indicating the data type of the column:
|
collength | Any of the following data types:
| The value depends on the data type of the column. For some data types, the value is the column length (in bytes). See Storing Column Length for more information. |
colmin | INTEGER | Minimum column length (in bytes) |
colmax | INTEGER | Maximum column length (in bytes) |
extended_id | INTEGER | Data type code, from the sysxtdtypestable, of the data type specified in the coltype column |
seclabelid | INTEGER | The label ID of the security label associated with the column if it is a protected column. NULL otherwise. |
colattr | SMALLINT |
|
[DB] Informix SystemTable 應用
Informix 中,可以用下列的指令取得Table Name,
select tabname from systables
where tabname your condition
select tabname from systables
where tabname your condition
Column | Type | Explanation |
---|---|---|
tabname | VARCHAR(128) | Name of table, view, synonym, or sequence |
owner | CHAR(32) | Owner of table (user informix for system catalog tables and usernamefor database tables) |
partnum | INTEGER | Physical storage location code |
tabid | SERIAL | System-assigned sequential identifying number |
rowsize | SMALLINT | Maximum row size in bytes ( < 32,768) |
ncols | SMALLINT | Number of columns in the table |
nindexes | SMALLINT | Number of indexes on the table |
nrows | FLOAT | Number of rows in the table |
created | DATE | Date when table was created or last modified |
version | INTEGER | Number that changes when table is altered |
tabtype | CHAR(1) | Code indicating the type of table object:
|
locklevel | CHAR(1) | Lock mode for the table:
|
npused | FLOAT | Number of data pages that have ever been initialized in the tablespace by the database server |
fextsize | INTEGER | Size of initial extent (in KB) |
nextsize | INTEGER | Size of all subsequent extents (in KB) |
flags | SMALLINT | Codes for classifying permanent tables:
|
site | VARCHAR(128) | Reserved for future use |
dbname | VARCHAR(128) | Reserved for future use |
type_xid | INTEGER | Code from sysxtdtypes.extended_idfor typed tables, or 0 for untyped tables |
am_id | INTEGER | Access method code (key to sysamstable)
NULL or 0 indicates built-in storage manager
|
pagesize | INTEGER | The pagesize, in bytes, of the dbspace (or dbspaces, if the table is fragmented) where the table data resides. |
ustlowts | DATETIME YEAR TO FRACTION (5) | When table, row, and page-count statistics were last recorded |
secpolicyid | INTEGER | ID of the SECURITY policy attached to the table. NULL for non-protected tables |
protgranularity | CHAR(1) | LBAC granularity level:
|
statlevel | CHAR(1) | Statistics level
|
statchange | SMALLINT | For internal use only |
2018年6月11日 星期一
使用notepad++ 把傳統命名改為JAVA 命名
傳統的命名方式為
cust_name, user_email 等.
JAVA變數命名為駝峰式命名 Camel-Case 也稱為駝峰式大小寫.
可以使用notepad++ 正規表示法取代的方法變更命名.
Before:
cust_name, user_email
尋找內容:[_]{1,1}([a-z])
取代為:\U$1
After:
custName, userEmail
cust_name, user_email 等.
JAVA變數命名為駝峰式命名 Camel-Case 也稱為駝峰式大小寫.
可以使用notepad++ 正規表示法取代的方法變更命名.
Before:
cust_name, user_email
尋找內容:[_]{1,1}([a-z])
取代為:\U$1
After:
custName, userEmail
訂閱:
文章 (Atom)
Ads
