◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
给你一个sql语句吧
ms sqlserver
use master
if exists(select * from sysdatabases where name='TaxiManage')
drop database TaxiManage
create database TaxiManage
on primary
(
name = 'TaxiManage_data',
filename='c:prjectTaxiManage_data.mdf',
size=5mb,
maxsize=10mb,
filegrowth=10%
)
log on
(
name='TaxiManage_log',
filename='c:prjectTaxiManage_log.ldf',
size=1mb,
maxsize=3mb,
filegrowth=5%
)
go
use TaxiManage
if exists(select * from sysobjects where name='TaxiTable')
drop table TaxiTable
create table TaxiTable
(
ID bigint identity(0,1) not null,
TaxiNum varchar(20) not null,
TaxiMasterName varchar(20) not null,
TaxiMasterID int not null,
TaxiWokerName varchar(20) not null,
TaxiWokerID int not null,
IsOut int not null
)
go
alter table TaxiTable
add constraint PK_ID primary key (ID)
insert into TaxiTable(TaxiNum,TaxiMasterName,TaxiMasterID,TaxiWokerName,TaxiWokerID,IsOut)values('1','1',1,'1',1,1)
--delete TaxiTable where id=@@identity
select * from TaxiTable
select * from TaxiTable where TaxiNum='1' or TaxiMasterName='1' and TaxiMasterID=1 or TaxiWokerName='ddd' or TaxiWokerID=1 or IsOut=0
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
工作时间:8:00-18:00
电子邮件
www.eshc168.com
扫码二维码
获取最新动态