Home > Database > Mysql Tutorial > sqlserver数据库中的表、字段sql语句

sqlserver数据库中的表、字段sql语句

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 18:00:57
Original
1123 people have browsed it

在数据库中创建的每个对象(例如约束、默认值、日志、规则以及存储过程)都对应一行。

1.系统表sysobjects

在数据库中创建的每个对象(例如约束、默认值、日志、规则以及存储过程)都对应一行。

参考

2.syscolumns

为每个表和视图中的每列返回一行,并为数据库中的存储过程的每个参数返回一行。

参考

删除某数据库内的表

declare dlist cursor for
select name from sysobjects where xtype='U'
open dlist
declare @n varchar(4000)
fetch next from dlist into @n
while @@fetch_status=0
begin
declare @es varchar(4000)
set @es='DROP table
exec( @es)
fetch next from dlist into @n
end
close dlist
DEALLOCATE dlist

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template