码迷,mamicode.com
首页 > 数据库 > 详细

建库,建表,添加数据 SQL命令

时间:2018-12-01 12:59:48      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:sql命令   rac   key   com   char   base   建库   comment   float   

 

create database ssm default character set utf8;

use ssm;

create table flower(
    id int(10) primary key auto_increment comment‘编号‘,
    name VARCHAR(30) not null comment ‘花名‘,
    price float not null comment ‘价格‘,
    production varchar(30) not null comment ‘原产地‘
);

    insert into flower values(default,‘矮牵牛‘,2.5,‘南美阿根廷‘);
    insert into flower values(default,‘百日草‘,5.0,‘墨西哥‘);
    insert into flower values(default,‘半枝莲‘,4.3,‘巴西‘);

select * from flower;

 

建库,建表,添加数据 SQL命令

标签:sql命令   rac   key   com   char   base   建库   comment   float   

原文地址:https://www.cnblogs.com/axu521/p/10048553.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!