当前位置:网站首页>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 .
边栏推荐
- Why can't Bi software do correlation analysis? Take you to analyze
- Use file and directory properties and properties
- Debezium系列之:修改源码支持drop foreign key if exists fk
- 潘多拉 IOT 开发板学习(HAL 库)—— 实验8 定时器中断实验(学习笔记)
- 自动化测试的好处
- 企业级数据安全,天翼云是这样理解的
- Word finds red text word finds color font word finds highlighted formatted text
- Go语言 | 03 数组、指针、切片用法
- CF: B. almost Ternary Matrix [symétrie + règles de recherche + Construction + I am Construction Waste]
- Mathematical modeling of oil pipeline layout MATLAB, mathematical model of oil pipeline layout
猜你喜欢
[detailed explanation of AUTOSAR 14 startup process]
出海十年:新旧接力,黑马崛起
The basic grammatical structure of C language
Ultrasonic ranging based on FPGA
How to convert word into PDF? Word to PDF simple way to share!
618“低调”谢幕,百秋尚美如何携手品牌跨越“不确定时代”?
ELK分布式日志分析系统部署(华为云)
What are the reliable domestic low code development platforms?
详解SQL中Groupings Sets 语句的功能和底层实现逻辑
2022 the most complete Tencent background automation testing and continuous deployment practice in the whole network [10000 words]
随机推荐
面试官:Redis 过期删除策略和内存淘汰策略有什么区别?
Mathematical modeling of oil pipeline layout MATLAB, mathematical model of oil pipeline layout
100million single men and women supported an IPO with a valuation of 13billion
Interprocess communication (IPC): shared memory
Applet modification style (placeholder, checkbox style)
数学分析_笔记_第9章:曲线积分与曲面积分
Decision tree and random forest
使用文件和目录属性和属性
尚硅谷尚优选项目教程发布
【历史上的今天】7 月 5 日:Google 之母出生;同一天诞生的两位图灵奖先驱
Emqx 5.0 officially released: a single cluster supports 100million mqtt connections
5 years of experience, 27 days of Android programmer interview, 2022 programmer advanced classic
2022 the latest big company Android interview real problem analysis, Android development will be able to technology
Oracle 中文排序 Oracle 中文字段排序
RedHat7.4配置yum软件仓库(RHEL7.4)
Tupu software digital twin | visual management system based on BIM Technology
Talking about fake demand from takeout order
Advanced application of C # language
The easycvr authorization expiration page cannot be logged in. How to solve it?
flume系列之:拦截器过滤数据