数据库添表

添加表:

create database test

删除表:

drop database test

使用test:

use test

创建表格:

create  table stu :

(

   id int   primary key'

    sex bit'

    age int'

  name nvarchar(50) not null'

 birthday datetime not null'

 class int

)

删除表格:

drop table stu 

添加 score

alter table stu  add  score decimal(5'1)

删除列age

alter  table stu drop column age

增加值

insert into stu values (1,'true','张三','1995-3-2',1,90.5) 

显示和删除

select *from stu
delete from stu

truncate table stu

update stu set name ='李四'

 

转载于:https://www.cnblogs.com/yujiamin123/p/7049531.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值