惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
N
Netflix TechBlog - Medium
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
V
Visual Studio Blog
H
Help Net Security
Engineering at Meta
Engineering at Meta
Hugging Face - Blog
Hugging Face - Blog
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
博客园 - 【当耐特】
B
Blog
Stack Overflow Blog
Stack Overflow Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
博客园 - 司徒正美
博客园 - 叶小钗
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell

博客园 - pysharp

openstack horizon api step by step understanding horizon's template path what can PsTools\psexec do! - pysharp What's New in Python3.0 - pysharp [转]利用adsutil.vbs脚本创建自定义web站点 我的2008. TypeConvert Demo javascript 调试器v1.0.0.0 Dundas Chart Demo For New User - pysharp c#面向对象中的继承初步认识 .net 集合类初步认识 c# 目录操作类 c# 文件操作类 - pysharp - 博客园 关于urlrewrite的小DEMO - pysharp - 博客园 c# 动态编译方法 c# 读取Excel到datable asp.net 下载和在线预览Excel的方法 排序算法 c#实现 简单使用nHibernate,新手练习用。
sql基础篇,不断更新中......
pysharp · 2008-07-08 · via 博客园 - pysharp

刚开始用的时候到处上网找,把自己找到的东西记录下来,以备后用。

------查询所有数据库 系统库 用户库
select   *   from   master.dbo.sysdatabases   where   dbid<7  
select   *   from   master.dbo.sysdatabases   where   dbid>=7

------查询一个数据库中的所有表 [type] = 'u' 是用户表,[type] = 's'是系统表

select * from dbname.dbo.[sysobjects] where [type] = 'u'

------查询一个表中的所有字段(我尝试不用[ID],而用[name]去查,结果报错了)

select * from dbname.dbo.[syscolumns] where id in (select id from dbname.dbo.[sysobjects] where name='empinfo')

------得到一个库的所有表 为当前用户具有权限的当前数据库中的每个表返回一行。
select * from INFORMATION_SCHEMA.TABLES