create table aaa(id int(10),name varchar2(10)) > 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'varchar2(10))' at line 1 > 时间: 0.001s
时间: 2023-07-02 11:10:08 浏览: 125
在 MariaDB 中,应该使用 `varchar` 而不是 `varchar2`。请尝试使用以下命令创建表:
```
CREATE TABLE aaa (id int(10), name varchar(10));
```
这应该可以正常工作。
相关问题
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Supplement( su_id int not null, su_name varchar(100) not null, su_value varchar(' at line 1 mysql> create Supplement( -> su_id int not null, -> su_name varchar(100) not null, -> su_value varchar(50), -> class_id int not null, -> primary key (su_id) -> ); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Supplement( su_id int not null, su_name varchar(100) not null, su_value varchar(' at line 1
您的SQL语法有误。创建表的正确语法为:
```
CREATE TABLE Supplement (
su_id INT NOT NULL,
su_name VARCHAR(100) NOT NULL,
su_value VARCHAR(50),
class_id INT NOT NULL,
PRIMARY KEY (su_id)
);
```
请注意,正确的语法是`CREATE TABLE`而不是`CREATE`,并且应该使用`TABLE`而不是`Supplement`。另外,应该在`CREATE TABLE`之后指定表的名称。
阅读全文