Search
 
SCRIPT & CODE EXAMPLE
 

SQL

spring where to put the data sql

-- You can simply create a data.sql file in your src/main/resources folder 
-- and it will be automatically executed on startup. 
-- In this file you just add some insert statements, eg.:

INSERT INTO users (username, firstname, lastname) VALUES
  ('lala', 'lala', 'lala'),
  ('lolo', 'lolo', 'lolo');
  
-- If you're using Spring boot 2, database initialization only works for 
-- embedded databases (H2, HSQLDB, ...). If you want to use it for other 
-- databases as well, you need to change the 
-- spring.datasource.initialization-mode property:

spring.datasource.initialization-mode=always
Comment

PREVIOUS NEXT
Code Example
Sql :: sql stored procedure with output parameters 
Sql :: Mysql Create table with foreign keys. 
Sql :: sql get the name of user pc 
Sql :: mysql query single row 
Sql :: not exists mysql 
Sql :: update query with between in mysql 
Sql :: oracle select first row order by 
Sql :: get number of table colums in sql query 
Sql :: current date in postgresql minus 1 day 
Sql :: mysql ip address data type 
Sql :: mysql query dates between two dates 
Sql :: mysql alter add foreign key 
Sql :: sql drop column 
Sql :: oracle revoke 
Sql :: update with select postgresql 
Sql :: oracle apex warning message 
Sql :: mysql local password denied 
Sql :: sql insert from excel 
Sql :: How to check if the column exists in sql table 
Sql :: The local psql command could not be located 
Sql :: sqlite get last 
Sql :: postgresql delete limit 
Sql :: mysql group by date 
Sql :: Inner join - to join 3 tables - https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-inner-join/ 
Sql :: sql injection payload list github 
Sql :: create table in sql server 
Sql :: sql order by multiple columns 
Sql :: default number in sql 
Sql :: How do I insert a blob in SQL? 
Sql :: sqlserver add column 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =