sql基础知识

create table a(

id int(32) primary key ,

sex varchar(32) not null  unique ,

forgein key (name) references b(name),

age int(10) default 1,

customerID int(10) not null auto_increment

)engine=innodb,

default charset= utf8 collate utf8_general_ci ;

insert into a(id,sex)values(1,'m')

delete from a where id=1

update  a set sex='w' where id=1

alter table a add addr varvhar(32);

alter table a drop addr

alter table a modify sex varchar(21)

alter table a rename aaa

alter table aaa rename a

alter table a add constraint fk_dept forgen key (addr) references b (addr)

alter table a drop forgein key fk_dept

show create databases aaa;

show create table aaa;

show full columns from aaa;

create producer input(in id int)

as

begin 

        select id;

 set id=3;

select id;

end

set @id=1;

call input(@id);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值