复习

 欢迎来到 unity 学习 、 unity 培训  unity 企业培训 教育专区,这里有很多 U3D 资源 、 U3D 培训视频 U3D 教 程 U3D 常见问题  U3D 项目源码, 我们致力于打造业内 unity3d 培训 、学习第一品牌

数据库的一些基本操作
--建表
create table market(
  id int primary key identity(1,1),
  name varchar(50),
  password varchar(50)

)
--查询
select*from shop
select*from users
select*from usershop 
--删除一行数据
delete from shop where name='袜子'
--添加一条数据
insert into shop  values ('裤子',100,100)
--修改一条数据
update shop set price =20 where id='1'
--多表的查询
select  users.name,shop.name ,  usershop.number from usershop  inner join users on users.id =usershop .sid   inner  join  shop on usershop.uid =shop.id
--批量的向表中插入数据
 insert into shop(name,price,number)
 select'鞋子','100','50'union
 select'裤擦宗子','100','50'
迭代器的格式
ArrayList list = new usershopping().show();
            IEnumerator it = list.GetEnumerator();
            while (it.MoveNext())
            {
                user e = (user)it.Current;
                it.MoveNext();
                Shop  e2 = (Shop )it.Current;
                it.MoveNext();
                usershopping  g = (usershopping )it.Current;
                Console.WriteLine(e.Name +"      "+e2.Name +"           "+g.Number );
            }


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值