如题,mysql建表语句报错

  • 分析:就是一个语法错误,具体问题具体分析
  • 本例中,直接赋值过来的 sql建表语句,直接粘贴到mysql数据库运行,报错!
  • 经查询,mysql中 number类型的定义有如下选择:

Number 类型:

数据类型 描述

TINYINT(size) -128 到 127 常规。0 到 255 无符号。在括号中规定最大位数。

SMALLINT(size) -32768 到 32767 常规。0 到 65535 无符号
。在括号中规定最大位数。

MEDIUMINT(size) -8388608 到 8388607 普通。0 to 16777215 无符号。在括号中规定最大位数。

INT(size) -2147483648 到 2147483647 常规。0 到 4294967295 无符号
。在括号中规定最大位数。

BIGINT(size) -9223372036854775808 到 9223372036854775807 常规。0 到 18446744073709551615 无符号*。在括号中规定最大位数。

FLOAT(size,d) 带有浮动小数点的小数字。在括号中规定最大位数。在 d 参数中规定小数点右侧的最大位数。

DOUBLE(size,d) 带有浮动小数点的大数字。在括号中规定最大位数。在 d 参数中规定小数点右侧的最大位数。

DECIMAL(size,d) 作为字符串存储的 DOUBLE 类型,允许固定的小数点。

create table dept(
deptno number(10) primary key,
dname varchar2(30),
loc varchar2(30)
)
  • 现sql
create table dept(
deptno int(10) primary key,
dname varchar(30),
loc varchar(30)
)

[Err] 1064 - 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 'number primary key,的更多相关文章

  1. MySql 执行语句错误 Err] 1064 - 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

    关于用Power Designer 生成sql文件出现 错误  [Err] 1064 - You have an error in your SQL syntax; check the manual ...

  2. [Err] 1064 - 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 ''<h1 style="text-align: center;">php

    [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s ...

  3. 插入mysql语句报错:1064 - 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

    插入一个很简单的sql语句时候,mysql一直报错: [SQL] INSERT INTO ORDER ( id, activity_id, order_type, phone, order_amoun ...

  4. 1064 - 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 'groups)VALUES('1','hh','hh@163.com','Boss')' at line 1

    mysql8.0版本 在已存在的表里插入一条数据 insert INTO api_user(id,username,email,groups)VALUES('1','hh','hh@163.com', ...

  5. 解决ROR 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 'creat table study_record( id int(11) not null

    之前一直用的好好的,突然就出现了这个错误: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual tha ...

  6. ERROR: 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 'type=InnoDB' at line 7

    问题: 使用hibernate4.1.1,数据库使用mysql5.1.30,使用hibernate自动生成数据库表时,hibernate方言使用org.hibernate.dialect.MySQLI ...

  7. C# Mysql 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 ????

    有几年没用过MySql数据了,今天在使用C#访问MySql数据库时出现了一个小插曲. 错误提示: You have an error in your SQL syntax; check the man ...

  8. 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 '

    mysql中如果字段使用了关键字,在插入和更新时会提示 You have an error in your SQL syntax; check the manual that corresponds ...

  9. MySQLSyntaxErrorException: 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 ...

    下面是我update数据库时打印出来的异常: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSynt ...

  10. 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 'like '%逸%'' at line 1

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-/ ...

随机推荐

  1. Visual Studio 2015 Enterprise - 企业版 - 简体中文

    文件名称 文件大小 百度网盘下载 微软官方下载 Visual Studio 2015 Enterprise - 企业版 - 简体中文 3.89GB http://pan.baidu.com/s/1bn ...

  2. Javascript一(变量,数据类型,正则表达式,数据,语句)

    本文章适合具有一定程序编程语言基础的人士阅读,最好学完Java基础再来阅读本文章更容易理解语言初学者会看起来比较费劲,不易理解 一.导入脚本 在html导入Javascript的格式是: <sc ...

  3. ubuntu win7双系统设置开机启动顺序

    ctrl+alt+t打开命令终端 sudo chmod +w /boot/grub/grub.cfg (赋予该文件写权限) sudo gedit /boot/grub/grub.cfg 将set de ...

  4. Java web项目配置相关

    引申 XML 命名空间(XML Namespaces) XML Schema 教程 XSD(XML Schema Definition) XML Schema 语言也称作 XML Schema 定义. ...

  5. Codeforces Round #438 by Sberbank and Barcelona Bootcamp (Div. 1 + Div. 2 combined)

    A. Bark to Unlock 题目链接:http://codeforces.com/contest/868/problem/A 题目意思:密码是两个字符组成的,现在你有n个由两个字符组成的字符串 ...

  6. Oracle性能优化之表压缩及并行提高效率的测试

    1.制作测试表 create table t1 as select * from FW_T_GTXLOG insert into t1 select * from t1; create table t ...

  7. JSP学习(第一课)

    JSP页面组成: 比如: 打开网页,右键查看源代码: 打开网页: 注意: <%!%>里面定义的属性是成员属性,相当于类的属性,方法相当于是全局的方法,相当于是类里面的方法.但是它是不可以进 ...

  8. IOS使用Core-Plot画折线图

    关于Core-Plot的配置.大家能够參考我的上一篇博客:http://1.wildcat.sinaapp.com/?p=99 版权全部.转载请注明原文转自:http://blog.csdn.net/ ...

  9. ffmpeg应用笔记

    官网 http://ffmpeg.org/ 应用手册 http://ffmpeg.org/documentation.html 雷霄骅专栏 https://blog.csdn.net/leixiaoh ...

  10. (14)如何使用Cocos2d-x 3.0制作基于tilemap的游戏:第二部分

    引言 程序截图: 这篇教程是<如何使用Cocos2d-x 3.0制作基于tilemap的游戏>的第二部分.在上一个教程中,我们创建了一个简单的基于tiled地图的游戏,里面有一个忍者在沙漠 ...