微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

SQL学习笔记二 创建表、插入数据的语句

创建一个表T_Employee并插入若干数据
<div class="codetitle"><a style="CURSOR: pointer" data="22146" class="copybut" id="copybut22146" onclick="doCopy('code22146')"> 代码如下:

<div class="codebody" id="code22146">
create table T_Employee(FNumber VARCHAR(20),FName VARCHAR(20),FAge int,FSalary NUMERIC(10,2),PRIMARY KEY(FNumber));
insert into T_Employee(FNumber,FName,FAge,FSalary) values('DEV001','Tom',25,8300);
insert into T_Employee(FNumber,FSalary) values('DEV002','Jerry',28,2300.80);
insert into T_Employee(FNumber,FSalary) values('SALES001','John',23,5000);
insert into T_Employee(FNumber,FSalary) values('SALES002','Kerry',6200);
insert into T_Employee(FNumber,FSalary) values('SALES003','Stone',22,1200);
insert into T_Employee(FNumber,FSalary) values('HR001','Jane',2200.88);
insert into T_Employee(FNumber,FSalary) values('HR002','Tina',5200.36);
insert into T_Employee(FNumber,FSalary) values('IT001','Smith',3900);
insert into T_Employee(FNumber,FSalary) values('IT002',27,2800);
大家可以查找下 create与insert命令的使用。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐