Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The implementation principle of importing CSV File into H2 Database

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "the realization principle of importing H2 database into CSV file". In the daily operation, I believe that many people have doubts about the realization principle of importing H2 database into CSV file. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "H2 database import CSV file realization principle". Next, please follow the editor to study!

1. Starting the H 2 database does not open the browser window (default is open) 2. Database creation SQL added support for BigDecimal type, while h3 database does not support bigdecimal type by default. The Sql code copy code is as follows: create table test (id int (11), charge BigDecimal (12))

The Sql code copy code is as follows: create table test (id int (11), charge BigDecimal (12))

3. The copy code for importing the database script by passing parameters is as follows: new Console (). RunTool (); new RunScript (). RunCustomTool ("jdbc:h3:~/test", "sa", "", "c:/schema.sql")

The copy code for importing CSV file into H2 database is as follows: insert into prescription (select * from csvread ('c:/JV/Demo/prescription2012-05-10 22-26-37.csv'))

At this point, the study on the implementation principle of importing H2 database into CSV file is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report