博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
sql编写注意
阅读量:4357 次
发布时间:2019-06-07

本文共 522 字,大约阅读时间需要 1 分钟。

DROP TABLE IF EXISTS `imooc_pro`;CREATE TABLE `imooc_pro`(`id` int unsigned auto_increment key,`pName` varchar(50) not null,`pNum` int unsigned default 1,`mPrice` decimal(10,2) not null,`iPrice` decimal(10,2) not null,`pDesc` text,`pImg` varchar(50) not null,`pubTime` int unsigned not null,`isShow` tinyint(1) default 1,`isHot` tinyint(1) default 0,`cId` smallint unsigned not null);

 如同上面的一个建立一个数据列表, 应注意几点:

1:注意给id,pName这些元素,加的标点是·符号(与~在一个键);

2:设定一个主键;

3:最后一行语句后不要再加逗号了。

转载于:https://www.cnblogs.com/jacson/p/4239814.html

你可能感兴趣的文章
spring 的单例模式
查看>>
Python学习手册
查看>>
完整的系统帮助类Utils
查看>>
Python 的语言特性
查看>>
使用PowerShell批量注册DLL到GAC
查看>>
微软职位内部推荐-Senior Development Engineer
查看>>
创建数据库的方法
查看>>
递归算法
查看>>
关于java中sendRedirect,forward和include区别
查看>>
在红帽RHEL7.0里配置网卡的四种方法
查看>>
LeetCode--二分查找相关算法
查看>>
RobotFramework自动化测试框架系统关键字之断言
查看>>
《Node.js In Action》笔记之流程控制
查看>>
通俗易懂云计算
查看>>
个人笔记 - Word2013 论文格式调整
查看>>
Python学习---Python下[字典]的学习
查看>>
Python学习---重点模块之xml
查看>>
Python学习---django之admin简介
查看>>
个人工作总结11(第二阶段)
查看>>
配置完IDEA开发lua后用idea竟然打不开lua的文件。
查看>>