CustomControl
METADATA
Attribute | Value |
---|---|
Topic | 1630-client-book-risk |
MLink Token | ClientControl |
Product | SRControl |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
key | VARCHAR(16) | PRI | '' | user defined key |
clientFirm | VARCHAR(16) | PRI | '' | |
userText | TINYTEXT | '' | user defined text | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
key | 1 |
clientFirm | 2 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgCustomControl` (
`key` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'user defined key',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`userText` TINYTEXT NOT NULL DEFAULT '' COMMENT 'user defined text',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`key`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';
SELECT TABLE EXAMPLE QUERY
SELECT
`key`,
`clientFirm`,
`userText`,
`timestamp`
FROM `SRControl`.`MsgCustomControl`
WHERE
/* Replace with a VARCHAR(16) */
`key` = 'Example_key'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRControl`.`MsgCustomControl`
SET
/* Replace with a TINYTEXT */
`userText` = 'dummy tiny text',
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a VARCHAR(16) */
`key` = 'Example_key'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRControl`.`MsgCustomControl`(
/* Replace with a VARCHAR(16) */
`key`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a TINYTEXT */
`userText`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_key',
'Example_clientFirm',
'dummy tiny text',
'2022-01-01 12:34:56.000000'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRControl`.`MsgCustomControl`
WHERE
/* Replace with a VARCHAR(16) */
`key` = 'Example_key'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='CustomControl' ORDER BY ordinal_position ASC;