2比吧 关注:18贴子:260
  • 7回复贴,共1

2bi吧因你而精彩

只看楼主收藏回复



1楼2013-01-21 19:42回复
    你个没高潮的,


    来自iPhone客户端2楼2013-01-21 22:33
    收起回复
      1. 查询所有的读者信息,包括年龄
      select reader.*,year(now())-year(birthday)
      from reader
      2. 添加一条借阅记录,01002号读者借阅0003号图书,借阅日期为今天
      use readbook;
      insert into borrow
      values('01002','0003',curdate(),null)
      3. 查询计信专业的读者信息
      select reader.*
      from reader
      where mid(unit,1,2)='计信'
      4. 查询所有图书信息,价格在30以下的显示便宜,30以上的显示贵
      select book.*,if(price<30,'便宜','贵')
      from book
      5. 查询所有的借阅信息,没还书的显示“没还”,否则显示“已还”
      select borrow.*,if(returndate is null,'没还','已还')
      from borrow
      6. 查询所有2个月前借的还没还的借书信息
      select *
      from borrow
      where borrowdate>date_sub(now( ), interval 2 month) and
      returndate is null;
      7. 查询年龄大于19的读者信息
      select reader.*
      from reader
      where year(now())-year(birthday)>19
      8. 修改图书的价格,30以下的图书价格提高20%,30以上的图书价格提高10%
      update book
      set price=if(price<30,price* 1.2,price* 1.1)


      3楼2013-04-17 14:43
      回复
        Switch1
        Switch>
        Switch>en
        Switch#con t
        Enter configuration commands, one per line. End with CNTL/Z.
        Switch(config)#vlan 10
        VLAN 10 added:
        Name:VLAN0010
        Switch(config)#vlan 20
        VLAN 20 added:
        Name:VLAN0020
        Switch(config)#int f0/11
        Switch(config-if)#switchport access vlan 10
        Switch(config-if)#int f0/12
        Switch(config-if)#switchport access vlan 20
        Switch(config-if)#switchport mode trunk
        Switch(config-if)#int f0/1
        Switch(config-if)#switchport mode trunk
        Switch(config-if)# Switch2
        Switch>
        Switch>en
        Switch#con t
        Enter configuration commands, one per line. End with CNTL/Z.
        Switch(config)#
        Switch(config)#int f0/1
        Switch(config-if)#switchport mode trunk
        Switch(config-if)#int vlan 10
        Switch(config-if)#ip address 192.168.10.254 255.255.255.0
        Switch(config-if)#int vlan 20
        Switch(config-if)#ip address 192.168.20.254 255.255.255.0
        Switch(config-if)#


        4楼2013-04-27 14:33
        回复