以下查詢是否有任何較短的等效項:(我無法更改表)。演員是否適用於此?我的SQL castr運算符
select convert(old_text using utf8) as text,
convert(rev_timestamp using utf8) as ts,
convert(rev_user_text using utf8) as user from revision;
更新:表模式是:
CREATE TABLE `revision` (
`rev_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`rev_page` INT(10) UNSIGNED NOT NULL,
`rev_text_id` INT(10) UNSIGNED NOT NULL,
`rev_comment` TINYBLOB NOT NULL,
`rev_user` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`rev_user_text` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'latin1_bin',
`rev_timestamp` BINARY(14) NOT NULL DEFAULT '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0',
`old_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`old_text` MEDIUMBLOB NOT NULL,
`old_flags` TINYBLOB NOT NULL,
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
它不會改變當前行的格式。 – PHPst