官网
下载https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads
建表主键自增
CREATE TABLE GCGLZX.dbo.fire_control (
id bigint identity(1,1) not null PRIMARY key,//identity代表自增 括号参数代表始末数
maintain decimal(18,2) NULL,
repair decimal(18,2) NULL,
other_repair decimal(18,2) NULL,
month1 int NULL
);
建表列名不要与默认关键词冲突
列名不要用下划线,否则用mybaitsplus查询不做处理时会出现null的情况
在sqlserver集成到springboot后打成jar包,cmd启动jar包可能会报如下错误:
问题所在是:【The server selected protocol version TLS10 is not accepted by client preferences [TLS12]】,意思是数据库服务端的协议版本是TLS10,而客户端协议版本是TLS12。
解决办法如下:
java -jar -Djava.security.properties=D:\work\server\a\my.java.security sqlserver-0.0.1-SNAPSHOT.jar
#my.java.security的内容如下:
jdk.tls.disabledAlgorithms=SSLv3, 3DES_EDE_CBC, DES, MD5withRSA, \
DH keySize < 1024, EC keySize < 224, anon, NULL, \
include jdk.disabled.namedCurves
执行结果如下:
启动成功!
改变表中字段的属性sql
alter table new_wast_water alter column timex datetime