zoukankan
html css js c++ java
有用的数据SQL脚本(做数据字典比较有用哦)
select
[
name
]
from
[
sysdatabases
]
order
by
[
name
]
查询一个数据库中的所有表
select
[
id
]
,
[
name
]
from
[
sysobjects
]
where
[
type
]
=
'
u
'
and
status
>
0
都知道
[
type
]
=
'
u
'
是用户表,
[
type
]
=
'
s
'
是系统表吧。
根据上个语句的查询结果然后再
查询一个表中的所有字段(我尝试不用
[
ID
]
,而用
[
name
]
去查,结果报错了)
select
[
name
]
from
[
syscolumns
]
where
[
id
]
=
1931153925
查询表结构
SELECT
table_name,column_name,column_default,
is_nullable,data_type,character_maximum_length
FROM
INFORMATION_SCHEMA.COLUMNS
SELECT
table_name
as
'
表名
'
,column_name
as
'
列名
'
,data_type
as
'
类型
'
,
character_maximum_length
as
'
长度
'
,column_default
as
'
默认值
'
,is_nullable
as
'
是否为空
'
FROM
INFORMATION_SCHEMA.COLUMNS
where
table_name
in
(
select
name
from
sysobjects
where
xtype
=
'
u
'
and
status
>
0
)
order
by
table_name
将孤立的用户名关联
sp_change_users_login
'
report
'
sp_change_users_login
'
update_one
'
,
'
OAS
'
,
'
OAS
'
sp_change_users_login
'
Auto_Fix
'
,
'
test
'
,
NULL
,
'
testpassword
'
查看全文
相关阅读:
TensorFlow设置GPU占用量
与服务器同步工程(expect脚本)
C/C++中#pragma once的使用
sublime text 3 快捷键大全
Sublime Text 3 注册码
如何用diff比较两个文件夹下的内容
Error in building opencv with ffmpeg
opencv: Rotate image by 90, 180 or 270 degrees
初识HTTPS
Unity3D之Mecanim动画系统学习笔记(十一):高级功能应用
原文地址:https://www.cnblogs.com/ringwang/p/1230916.html
最新文章
madown标签说明
mac电脑如何不生成.DS_STORE文件
Mybatis传多个参数(三种解决方案)
linux下redis设置密码登录
spring boot注解之@Scheduled定时任务实现
activemq安全设置 设置admin的用户名和密码
linux crontab 文件位置和日志位置
阿里云服务器被挖矿minerd入侵的解决办法
[转]Linux网络
【转】MarkDown添加图片的三种方式
热门文章
markdown种嵌入html标签,实现自定义样式
markdown锚点
markdown里面编辑代码
学习markdown(一)
【转】An introduction to using and visualizing channels in Go
【转】 Anatomy of Channels in Go
【转】以Python为例的Async / Await的编程基础
[转]Serverless实践
Git branch && Git checkout常见用法
Ubuntu 16.04下添加新用户
Copyright © 2011-2022 走看看