How to create table in H2 database? [Hindi] #7

Опубликовано: 04 Октябрь 2024
на канале: Programming Galaxy
4,420
31

CREATE is a generic SQL command used to create Tables, Schemas, Sequences, Views, and Users in H2 Database server.
When we create a project then select three dependency these are -
1). Spring Web
2). H2 Database
3). Spring Data JPA
...............................................................................................................................
And add some property in application.properties file these are -
server.port=9197
spring.h2.console.enabled=true
spring.datasource.platform=h2
spring.datasource.url=jdbc:h2:mem:shashi

Whether or not you can give it is up to you -
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=myuser
spring.datasource.password=mypwd
....................................................................................................................
Here, 'shashi' is the database name also you can change. and also change username and password.


#programminggalaxy
#springboot
#springboottutorial