当前位置:网站首页>The binary string mode is displayed after the value with the field type of longtext in MySQL is exported
The binary string mode is displayed after the value with the field type of longtext in MySQL is exported
2022-07-05 19:12:00 【1024 questions】
MySQL Field type is longtext The binary string is displayed after the value of is exported
Use MySQL Of CAST() Function or CONVERT() function
MySQL Basic sentences and usage of
WHERE Clause : Condition search
UPDATE Clause : Data update
DELETE Clause : Delete data
LINK Clause : Metacharacter lookup
UNION The operator : Joint query results
MySQL Field type is longtext The binary string is displayed after the value of is exportedMySQL The field type in is longtext The field value of is saved as Blob (Binary large objects), So export sql Or will sql When querying data exported to other formats , You need to convert the field type in advance , Conversion mode :
Use MySQL Of CAST() Function or CONVERT() functiongrammar :
CAST(value as type);CONVERT(value, type);Example :
SELECT CAST(t.longtextField AS CHAR) AS longtextFieldFROM tableName t;SELECT CONVERT(t.longtextField, CHAR) AS longtextFieldFROM tableName t;MySQL Basic sentences and usage of WHERE Clause : Condition search SELECT Column name ·· FROM The name of the table ·· WHERE Conditions (AND)(OR)explain :
You can use one or more tables in a query statement , Use commas between tables , Division , And use WHERE Statement to set the query conditions .
You can WHERE Clause to specify any condition .
You can use AND perhaps OR Specify one or more conditions .
Be careful : if WHERE add BINARY, Then the field value will be case sensitive .
UPDATE Clause : Data updateUPDATE The name of the table SET Column name = The new value WHERE Column name = Certain value explain :
Choose to update multiple fields at the same time .
stay WHERE Post specified condition .
DELETE Clause : Delete dataDELETE FROM The name of the table WHERE Column name = value explain :
If not specified WHERE Clause ,MySQL All records in the table will be deleted .
You can WHERE Clause to specify any condition
You can delete records once in a single table .
LINK Clause : Metacharacter lookupSELECT Column name FROM table_nameWHERE field1 LIKE condition1 [AND [OR]] filed2 = 'somevalue'explain :
stay WHERE Clause to specify any condition .
stay WHERE Used in clauses LIKE Clause .
You can use LIKE Clause instead of equal sign =.
LIKE Usually with % Use together , Similar to a metacharacter search .
You can use AND perhaps OR Specify one or more conditions .
You can DELETE or UPDATE Use in command WHERE...LIKE Clause to specify the condition .
'%a' // With a Data at the end 'a%' // With a Initial data '%a%' // contain a The data of '_a_' // Three and the middle letter is a Of '_a' // Two characters and the ending letter is a Of 'a_' // It's two and starts with a Of UNION The operator : Joint query results SELECT Column name FROM tables[WHERE conditions]UNION [ALL | DISTINCT]SELECT Column name FROM tables[WHERE conditions];explain :
expression1, expression2, ... expression_n: Columns to retrieve .
tables: Data table to retrieve .
WHERE conditions: Optional , Retrieve conditions .
DISTINCT: Optional , Delete duplicate data in result set . By default UNION The operator has removed the duplicate data , therefore DISTINCT Modifiers have little effect on the results .
ALL: Optional , Return all result sets , Contains duplicate data .
The above is personal experience , I hope I can give you a reference , I also hope you can support the software development network .
边栏推荐
- Decision tree and random forest
- R语言使用lubridate包处理日期和时间数据实战
- Password reset of MariaDB root user and ordinary user
- 块编辑器如何选择?印象笔记 Verse、Notion、FlowUs
- [detailed explanation of AUTOSAR 14 startup process]
- 5年经验Android程序员面试27天,2022程序员进阶宝典
- flume系列之:拦截器过滤数据
- Debezium系列之:postgresql从偏移量加载正确的最后一次提交 LSN
- MySql中的longtext字段的返回问题及解决
- 数据库 逻辑处理功能
猜你喜欢

一朵云开启智慧交通新未来

After the company went bankrupt, the blackstones came

The worse the AI performance, the higher the bonus? Doctor of New York University offered a reward for the task of making the big model perform poorly

Debezium系列之:记录mariadb数据库删除多张临时表debezium解析到的消息以及解决方法
MySql中的longtext字段的返回问题及解决

C# 语言的高级应用

Can Leica capture the high-end market offered by Huawei for Xiaomi 12s?

尚硅谷尚优选项目教程发布

Tutoriel de téléchargement et d'installation du progiciel fuzor 2020

word如何转换成pdf?word转pdf简单的方法分享!
随机推荐
MySql中的longtext字段的返回问题及解决
Vagrant2.2.6 supports virtualbox6.1
Word查找红色文字 Word查找颜色字体 Word查找突出格式文本
JS解力扣每日一题(十二)——556. 下一个更大元素 III(2022-7-3)
How to convert word into PDF? Word to PDF simple way to share!
R语言使用lubridate包处理日期和时间数据实战
cf:B. Almost Ternary Matrix【对称 + 找规律 + 构造 + 我是构造垃圾】
JAD的安装、配置及集成IDEA
机器学习基础(三)——KNN/朴素贝叶斯/交叉验证/网格搜索
uniapp获取微信头像和昵称
[today in history] July 5: the mother of Google was born; Two Turing Award pioneers born on the same day
Interviewer: what is the difference between redis expiration deletion strategy and memory obsolescence strategy?
手把手教你处理 JS 逆向之图片伪装
华律网牵手观测云,上线系统全链路可观测平台
2022最新大厂Android面试真题解析,Android开发必会技术
MySQL中字段类型为longtext的值导出后显示二进制串方式
Talking about fake demand from takeout order
ELK分布式日志分析系统部署(华为云)
flume系列之:拦截器过滤数据
How to quickly advance automated testing? Listen to the personal feelings of the three bat test engineers