您现在的位置: 什么是 >> 电脑通讯 >> 文章正文
《什么是Database》
作者:未知 来源:网络 点击数: 日期:2008-4-8
问题:什么是Database?Database是什么意思?
e*1.06

else e_wage*1.05

end

--WHILE CONTINUE BREAK

declare @x int @y int @c int

select @x = 1 @y=1

while @x < 3

begin

print @x --打印变量x 的值

while @y < 3

begin

select @c = 100*@x + @y

print @c --打印变量c 的值

select @y = @y + 1

end

select @x = @x + 1

select @y = 1

end

--WAITFOR

--例等待1 小时2 分零3 秒后才执行SELECT 语句

waitfor delay ’01:02:03’

select * from employee

--例等到晚上11 点零8 分后才执行SELECT 语句

waitfor time ’23:08:00’

select * from employee

***SELECT***

select *(列名) from table_name(表名) where column_name operator value

ex:(宿主)

select * from stock_information where stockid = str(nid)

stockname = 'str_name'

stockname like '% find this %'

stockname like '[a-zA-Z]%' --------- ([]指定值的范围)

stockname like '[^F-M]%' --------- (^排除指定范围)

--------- 只能在使用like关键字的where子句中使用通配符)

or stockpath = 'stock_path'

or stocknumber < 1000

and stockindex = 24

not stocksex = 'man'

stocknumber between 20 and 100

stocknumber in(10,20,30)

order by stockid desc(asc) --------- 排序,desc-降序,asc-升序

order by 1,2 --------- by列号

stockname = (select stockname from stock_informationwhere stockid= 4)

--------- 子查询

--------- 除非能确保内层select只返回一个行的值,

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页

  • 上一条文章:
  • 下一条文章: 没有了
  • 版权声明:《什么是Database》来源网络,版权归原作者所有,若涉及版权问题,请与我们联系,我们会及时删除!若标明本站原创或者来源www.shenmeshi.com的,转载时请注明,谢谢!所有文章仅供参考,并不构成操作建议! mail:shenmeshi.cn(AT)gmail.com
    评论
    站内文章搜索