当前位置:网站首页>Database mysql all

Database mysql all

2022-07-05 06:36:00 LZYmarks

mysql Corresponding to the data type Java type

 Insert picture description here
 Insert picture description here

-------------------------------------------- Report errors ----------------------------------------------------

When creating a database table, there is one more comma

 CREATE TABLE `login` (
  Field , Field , Field , Field ,   <---------  That's the comma 
) ENGINE=InnoDB DEFAULT CHARSET=utf8

-------------------------------------------/ Report errors ----------------------------------------------------

-------------------------------------------- Build table ----------------------------------------------------

Self incrementing and unique indexes will not be created

CREATE TABLE usertable(
  user_id INT(30) PRIMARY KEY AUTO_INCREMENT,
  user_name VARCHAR(200) UNIQUE  NOT NULL,
  NAME VARCHAR(200) NOT NULL,
  document_type VARCHAR(200) NOT NULL,
  document_num INT(18) NOT NULL,
  phone_num INT(16) UNIQUE  NOT NULL,
  email VARCHAR(200) NOT NULL,
  login_password VARCHAR(200) NOT NULL,
  pay_password INT(6) NOT NULL,
  user_state INT(1)

)

-------------------------------------------/ Build table ----------------------------------------------------

原网站

版权声明
本文为[LZYmarks]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050623286395.html