Popular Posts
android.intent.action.SCREEN_ON & android.intent.action.SCREEN_OFF First, I've tried create a receiver to receive screen on/off and register receiver on AndroidManifest.xml like below, but unfortunately ... runas RUNAS 使用方法: RUNAS [ [/noprofile | /profile] [/env] [/netonly] ] /user: program RUNAS [ [/noprofile | /profile] [/env] [/netonly] ... Diff Time DateTime from = new DateTime(2011, 1, 7); DateTime to = DateTime.Now; TimeSpan ts = to - from; Console.WriteLine("start time : {0:yyyy...
Stats
Query all columns of all tables
SELECT
    a.TABLE_NAME                as 表格名稱,
    b.COLUMN_NAME               as 欄位名稱,
    b.DATA_TYPE                 as 資料型別,
    b.CHARACTER_MAXIMUM_LENGTH  as 最大長度,
    b.COLUMN_DEFAULT            as 預設值,
    b.IS_NULLABLE               as 允許空值,
    (
        SELECT
            value
        FROM
            fn_listextendedproperty (NULL, 'schema', 'dbo', 'table', a.TABLE_NAME, 'column', default)
        WHERE
            name='MS_Description' 
            and objtype='COLUMN' 
            and objname Collate Chinese_Taiwan_Stroke_CI_AS = b.COLUMN_NAME
    ) as 欄位備註
FROM
    INFORMATION_SCHEMA.TABLES  a
    LEFT JOIN INFORMATION_SCHEMA.COLUMNS b ON ( a.TABLE_NAME=b.TABLE_NAME )
WHERE
    TABLE_TYPE in ('BASE TABLE','VIEW')
ORDER BY
    a.TABLE_NAME, ordinal_position