1. Preparation
First, I need to create a table and write the corresponding fields in it:
create table t_order_mt(
id UInt32,
sku_id String,
total_amount Decimal(16,2),
create_time Datetime
) engine =MergeTree
partition by toYYYYMMDD(create_time)
primary key (id)
order by (id,sku_id);
Next, you need to insert the corresponding data into it:
insert into t_order_mt values
(101,'sku_001',1000.00,'2020-06-01 12:00:00') ,
(102,'sku_002',2000.00,'2020-06-01 11:00:00'),
(102,'sku_004',2500.00,'2020-06-01 12:00:00'),
(102,'sku_002',2000.00,'2020-06-01 13:00:00'),
(102,'sku_002',12000.00,'2020-06-01 13:00:00'),
(102,'sku_002',600.00,'2020-06-02 12:00:00');
2. Error display
When I execute select * from table_name, the following problems may occur:
Code: 62. DB::Exception: Syntax error (Multi-statements are not allowed): failed at position 54 (end of query) (line 1, col 54): ;
FORMAT JSON . . (SYNTAX_ERROR) (version 21.11.6.7 (official build))
3. Solution
You only need to end the sentence after the corresponding sentence; Change to:
select * from t_order_mt;;
Results
Read More:
- Using mybatis statement.getGenreatedKeys(); usegeneratedkeys = “true”; using self incrementing primary key to get primary key value policy and Oracle do not support self incrementing, Oracle uses sequence
- mybatis “case when” Error: Failed to process, please exclude the tableName or statementId.
- Error: unreachable statement [How to Solve]
- JSON parse error: invalid UTF-8 solution series [How to Solve]
- Uncaught SyntaxError: Unexpected token o in JSON at position 1 [How to Solve]
- Mybatis query error: Exception in thread “main” org.apache.ibatis.exceptions.PersistenceException…
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘testApplicat
- Mybatis plus paging Plugin and Auto-fill
- Mybatis sets the primary key Auto-Increment error: No setter found for the keyProperty
- [Solved] IO exception: NL exception was generated
- Hibernate Error: Error executing DDL “create table course (xxx)“
- [Solved] Mybatis insert Error: Cause: java.sql.SQLException: SQL String cannot be empty
- [Solved] Sharding-Proxy Insert Datas Error: Sharding value must implements Comparable NoSuchElementException
- [Solved] Mybatis integrates PageHelper and uses sqlserver paging error
- org.hibernate.exception.SQLGrammarException: could not extract ResultSet, Resolve MySQL 5.7.5 or above GROUP_BY is not supported
- Springdatajpa @query with like @param
- [Solved] POI Read excel Error: Your InputStream was neither an OLE2 stream, nor an OOXML stream
- JAVA Code Start Exception Error View Does Not Exsit [Solved]
- Springboot thymeleaf Error: Exception processing template “table/dynamic_table”: Error resolving template [common]…
- JAVA: How to Read JSON Format Data (Web Game Development)