还没写完,就不小心点了发帖,下面是完整的有2张表
create table test1
(
a1 int primary key,
b1 datetime,
c1 char(4)
)create table test2
(
a2 int primary key,
c2 char(4)
)test1表原有记录:
a1 b1 c1
1 2005-1-30 预定test2表原有记录:
a2 c2
101 预定
当时间到2005-1-30时:自动改变test2记录为
101,空闲同时自动改变test1为
1,2005-1-30,空闲请问怎么做到?
create table test1
(
a1 int primary key,
b1 datetime,
c1 char(4)
)create table test2
(
a2 int primary key,
c2 char(4)
)test1表原有记录:
a1 b1 c1
1 2005-1-30 预定test2表原有记录:
a2 c2
101 预定
当时间到2005-1-30时:自动改变test2记录为
101,空闲同时自动改变test1为
1,2005-1-30,空闲请问怎么做到?
update test2 set c2='空闲' where getdate() = '2005-01-30'