/**
作者: William
日期: 2006-06
功能: 通过员工Id 随机获取 员工信息
**/
use Northwind
create proc getInfoByRandNumb
as
declare @theMin int,
@theMax int,
@getRandId int
set @theMin = (select min(employeeid) from employees)
set @theMax = (select max(employeeid) from employees)
set @getRandId = (select cast(@theMax * rand() + @theMin as int))
select * from employees where employeeid = @getRandId
/**************
把employee 表改成 你的"手机"表 试试
****************/
在英文系统中,更改数据表,或显示数据时,有时要加上 N
UPDATE WineList_cn
SET Country = N'南澳'
WHERE (Country = N'澳大利亚')