DML语句通常包括select/insert/delete/update/replace等,在传统数据库中,这些语句可以在表名和列名处增加库名限定,从而实现跨库访问。
但在HybridDB for MySQL 下,由于每个库之间不存在资源共享,跨库访问没有任何事务完整性保护,因此不支持跨库访问,DML语句不可携带库名。
HybridDB for MySQL 本身并不限制跨库访问语法,用户应检查访问语句避免跨库访问。
create or replace就是创建或者替换 格式例子如下:
create or replace trigger dml_depts_time before --在触发事件发生前 insert or update or delete --触发事件为增删改 on departments --对表departments begin --执行触发器体 if to_char(sysdate,'HH24:MI') not between '08:00' and '18:00' or to_char(sysdate,'DY') in ('SAT','SUN') then raise_application_error(-20205,'You may only make changes during normal office hours'); end if; end dml_depts_time
spring boot 2 官方文档,自己找下
```yml
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
spring.datasource.continue-on-error=false # Whether to stop if an error occurs while initializing the database.
spring.datasource.data= # Data (DML) script resource references.
spring.datasource.data-username= # Username of the database to execute DML scripts (if different).
spring.datasource.data-password= # Password of the database to execute DML scripts (if different).
spring.datasource.dbcp2.*= # Commons DBCP2 specific settings
spring.datasource.driver-class-name= # Fully qualified name of the JDBC driver. Auto-detected based on the URL by default.
spring.datasource.generate-unique-name=false # Whether to generate a random datasource name.
spring.datasource.hikari.*= # Hikari specific settings
spring.datasource.initialization-mode=embedded # Initialize the datasource with available DDL and DML scripts.
spring.datasource.jmx-enabled=false # Whether to enable JMX support (if provided by the underlying pool).
spring.datasource.jndi-name= # JNDI location of the datasource. Class, url, username & password are ignored when set.
spring.datasource.name= # Name of the datasource. Default to "testdb" when using an embedded database.
spring.datasource.password= # Login password of the database.
spring.datasource.platform=all # Platform to use in the DDL or DML scripts (such as schema-${platform}.sql or data-${platform}.sql).
spring.datasource.schema= # Schema (DDL) script resource references.
spring.datasource.schema-username= # Username of the database to execute DDL scripts (if different).
spring.datasource.schema-password= # Password of the database to execute DDL scripts (if different).
spring.datasource.separator=; # Statement separator in SQL initialization scripts.
spring.datasource.sql-script-encoding= # SQL scripts encoding.
spring.datasource.tomcat.*= # Tomcat datasource specific settings
spring.datasource.type= # Fully qualified name of the connection pool implementation to use. By default, it is auto-detected from the classpath.
spring.datasource.url= # JDBC URL of the database.
spring.datasource.username= # Login username of the database.
spring.datasource.xa.data-source-class-name= # XA datasource fully qualified name.
spring.datasource.xa.properties= # Properties to pass to the XA data source.
```
######
不同类型的数据库连接池读取的配置参数名不同,springboot如果没有指定数据库连接池,默认使用tomcat-jdbc连接池,其连接池参数配置:
spring.datasource.max-wait=10000######我意思是,有些资料(yml写法)写的是spring:datasource:maxWait,有些又写的是spring:datasource:max-wait,所以到底哪个才是正确的配置写法######
这跟版本有关系的大兄dei######
这个和yml文件没关系的,和spring boot中@ConfigurationProperties注解有关
spring boot 2 官方文档,自己找下
```yml
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
spring.datasource.continue-on-error=false # Whether to stop if an error occurs while initializing the database.
spring.datasource.data= # Data (DML) script resource references.
spring.datasource.data-username= # Username of the database to execute DML scripts (if different).
spring.datasource.data-password= # Password of the database to execute DML scripts (if different).
spring.datasource.dbcp2.*= # Commons DBCP2 specific settings
spring.datasource.driver-class-name= # Fully qualified name of the JDBC driver. Auto-detected based on the URL by default.
spring.datasource.generate-unique-name=false # Whether to generate a random datasource name.
spring.datasource.hikari.*= # Hikari specific settings
spring.datasource.initialization-mode=embedded # Initialize the datasource with available DDL and DML scripts.
spring.datasource.jmx-enabled=false # Whether to enable JMX support (if provided by the underlying pool).
spring.datasource.jndi-name= # JNDI location of the datasource. Class, url, username & password are ignored when set.
spring.datasource.name= # Name of the datasource. Default to "testdb" when using an embedded database.
spring.datasource.password= # Login password of the database.
spring.datasource.platform=all # Platform to use in the DDL or DML scripts (such as schema-${platform}.sql or data-${platform}.sql).
spring.datasource.schema= # Schema (DDL) script resource references.
spring.datasource.schema-username= # Username of the database to execute DDL scripts (if different).
spring.datasource.schema-password= # Password of the database to execute DDL scripts (if different).
spring.datasource.separator=; # Statement separator in SQL initialization scripts.
spring.datasource.sql-script-encoding= # SQL scripts encoding.
spring.datasource.tomcat.*= # Tomcat datasource specific settings
spring.datasource.type= # Fully qualified name of the connection pool implementation to use. By default, it is auto-detected from the classpath.
spring.datasource.url= # JDBC URL of the database.
spring.datasource.username= # Login username of the database.
spring.datasource.xa.data-source-class-name= # XA datasource fully qualified name.
spring.datasource.xa.properties= # Properties to pass to the XA data source.
```
######
不同类型的数据库连接池读取的配置参数名不同,springboot如果没有指定数据库连接池,默认使用tomcat-jdbc连接池,其连接池参数配置:
spring.datasource.max-wait=10000######我意思是,有些资料(yml写法)写的是spring:datasource:maxWait,有些又写的是spring:datasource:max-wait,所以到底哪个才是正确的配置写法######
这跟版本有关系的大兄dei######
这个和yml文件没关系的,和spring boot中@ConfigurationProperties注解有关
"
<a href=""https://docs.spring.io/spring-boot/docs/2.0.0.RELEASE/reference/htmlsingle/"" rel=""nofollow"">spring boot 2 官方文档,自己找下
```yml
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
spring.datasource.continue-on-error=false # Whether to stop if an error occurs while initializing the database.
spring.datasource.data= # Data (DML) script resource references.
spring.datasource.data-username= # Username of the database to execute DML scripts (if different).
spring.datasource.data-password= # Password of the database to execute DML scripts (if different).
spring.datasource.dbcp2.*= # Commons DBCP2 specific settings
spring.datasource.driver-class-name= # Fully qualified name of the JDBC driver. Auto-detected based on the URL by default.
spring.datasource.generate-unique-name=false # Whether to generate a random datasource name.
spring.datasource.hikari.*= # Hikari specific settings
spring.datasource.initialization-mode=embedded # Initialize the datasource with available DDL and DML scripts.
spring.datasource.jmx-enabled=false # Whether to enable JMX support (if provided by the underlying pool).
spring.datasource.jndi-name= # JNDI location of the datasource. Class, url, username & password are ignored when set.
spring.datasource.name= # Name of the datasource. Default to "testdb" when using an embedded database.
spring.datasource.password= # Login password of the database.
spring.datasource.platform=all # Platform to use in the DDL or DML scripts (such as schema-${platform}.sql or data-${platform}.sql).
spring.datasource.schema= # Schema (DDL) script resource references.
spring.datasource.schema-username= # Username of the database to execute DDL scripts (if different).
spring.datasource.schema-password= # Password of the database to execute DDL scripts (if different).
spring.datasource.separator=; # Statement separator in SQL initialization scripts.
spring.datasource.sql-script-encoding= # SQL scripts encoding.
spring.datasource.tomcat.*= # Tomcat datasource specific settings
spring.datasource.type= # Fully qualified name of the connection pool implementation to use. By default, it is auto-detected from the classpath.
spring.datasource.url= # JDBC URL of the database.
spring.datasource.username= # Login username of the database.
spring.datasource.xa.data-source-class-name= # XA datasource fully qualified name.
spring.datasource.xa.properties= # Properties to pass to the XA data source.
```
######
不同类型的数据库连接池读取的配置参数名不同,springboot如果没有指定数据库连接池,默认使用tomcat-jdbc连接池,其连接池参数配置:
spring.datasource.max-wait=10000######我意思是,有些资料(yml写法)写的是spring:datasource:maxWait,有些又写的是spring:datasource:max-wait,所以到底哪个才是正确的配置写法######
这跟版本有关系的大兄dei######
这个和yml文件没关系的,和spring boot中@ConfigurationProperties注解有关
"