Home Database Mysql Tutorial 查看SQL表的详细信息

查看SQL表的详细信息

Jun 07, 2016 pm 05:43 PM
Check details

查看SQL表的详细信息 给大家分享个查看sqlserver数据库中表的详细信息的sql语句(语句来自动软),虽然没有很复杂的技术,但是在sqlserver数据库中能够非常方便的看表的详细结构;结果图如下: 我把它写成了存储过程,调用存储过程时,参数是表名,这样在开

查看SQL表的详细信息

给大家分享个查看sqlserver数据库中表的详细信息的sql语句(语句来自动软),虽然没有很复杂的技术,但是在sqlserver数据库中能够非常方便的看表的详细结构;结果图如下:

我把它写成了存储过程,调用存储过程时,美国空间,美国空间,参数是表名,美国空间,这样在开发中会给我们一定的帮助

另说明:本方法使用与SQL2000数据库

create proc getTable @tabName varchar(50) =null as SELECT 表名=case a.colorder when 1 then d.name else '' end, 序号=a.colorder, 列名=a.name, 类型=b.name, 长度=CASE WHEN b.name=THEN a.length/THEN a.length/2 ELSE a.length END, 精度=COLUMNPROPERTY(a.id,a.name,), 小数=isnull(COLUMNPROPERTY(a.id,a.name,),0), 标识=)= end, 主键=and name end, 允许空= end, 默认值=isnull(e.text,''), 列说明=isnull(g.[value],'') FROM syscolumns a left join systypes b on a.xusertype=b.xusertype inner join sysobjects d on a.id=d.id and (d.xtype=or d.xtype=) and d.name left join syscomments e on a.cdefault=e.id left join sysproperties g on a.id=g.id and a.colid=g.smallid where d.name=@tabName or @tabName is null order by d.name,a.colorder

相信大家都会使用的吧 

另附上支持sql2005和sql2008的地址:

posted on

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Check out the steps to delete a logged-in device on Douyin Check out the steps to delete a logged-in device on Douyin Mar 26, 2024 am 09:01 AM

1. First, click to open the Douyin app and click [Me]. 2. Click the three-dot icon in the upper right corner. 3. Click to enter [Settings]. 4. Click to open [Account and Security]. 5. Select and click [Log in to device management]. 6. Finally, click to select the device and click [Remove].

How to easily check the installed version of Oracle How to easily check the installed version of Oracle Mar 07, 2024 am 11:27 AM

How to easily check the installed version of Oracle requires specific code examples. As a software widely used in enterprise-level database management systems, the Oracle database has many versions and different installation methods. In our daily work, we often need to check the installed version of the Oracle database for corresponding operations and maintenance. This article will introduce how to easily check the installed version of Oracle and give specific code examples. Method 1: Through SQL query in the Oracle database, we can

How to check your own ID on Xianyu_Introduction to how to check your personal nickname on Xianyu How to check your own ID on Xianyu_Introduction to how to check your personal nickname on Xianyu Mar 22, 2024 am 08:21 AM

As a trading platform, Xianyu requires you to register and log in to your account before using it. Users can set an ID name for their account. What if they want to check what their ID is? Let’s find out together below! Introduction to how to view personal nicknames on Xianyu. First, start the Xianyu app. After entering the homepage, switch to the page of selling idle, messages, and me, and click the [My] option in the lower right corner. 2. Then on my page we need to click [Avatar] in the upper left corner; 2. Then when we go to the personal homepage page we can see different information, we need to click the [Edit Information] button here; 4. Finally click We can see it later on the page where we edit information;

Where to check music rankings on NetEase Cloud Music_How to check music rankings on NetEase Cloud Music Where to check music rankings on NetEase Cloud Music_How to check music rankings on NetEase Cloud Music Mar 25, 2024 am 11:40 AM

1. After turning on the phone, select NetEase Cloud Music. 2. After entering the homepage, you can see the [Ranking List] and click to enter. 3. In the ranking list, you can select any list and click [New Song List]. 4. Select your favorite song and click on it. 5. Return to the previous page to see more lists.

How to view the hot list of Kuaishou Live Companion videos How to view the hot list of Kuaishou Live Companion videos Mar 29, 2024 pm 08:09 PM

Kuaishou Live Companion is not only a powerful live broadcast auxiliary tool, but also a real-time insight platform for hot topics and trends created for broadcasters. Through this function, anchors can quickly capture the content that audiences are most concerned about, and then adjust the live content to make it more in line with the audience's tastes and interests. So how to check the hot video list in the Kuaishou Live Companion app? This tutorial guide will provide you with a detailed introduction to the steps. I hope it can help you. How to view the hot video list on Kuaishou Live Companion? The second step is to click on the daily video hot list. The third step is to check the daily video hot list.

How to check how many groups you have joined on WeChat: a simple step How to check how many groups you have joined on WeChat: a simple step Mar 26, 2024 am 10:06 AM

Regardless of life or work, many people have long been deeply tied to WeChat and will be pulled into various groups at any time. So how many WeChat groups have you joined? You may immediately want to view the group chats in your address book, but only the WeChat groups you have saved in your address book will appear there, and other groups will not be visible. If you want to see all the WeChat groups you have joined, it is very simple: enter your nickname in the search box on the WeChat homepage, then find the group chat section in the search results, and click "More Group Chats" to view all related group chat information. Anyway, I was shocked. There were more than a hundred of them, and the scroll bar on the right became very small. Unfortunately, there is no specific number statistics... This method is also applicable to checking the QQ groups you have joined. PS: Some netizens also provided a trick:

How do I check which groups I have joined? How do I check which groups I have joined? Apr 01, 2024 pm 05:34 PM

WeChat group chat is not only a simple chat platform, but also a communication circle that brings together elites and enthusiastic friends from all walks of life. So today I will teach you how to see how many groups you have added on WeChat and how to save group chats. Usually Users who use WeChat must not miss it. How to check how many groups you have added to WeChat and how to save group chats To check how many groups you have added to WeChat: 1. You can view your group chat window in the WeChat main interface 2. If you have already saved the group chat, you can tap [ Address Book] - [Group Chat] 3. After entering the group chat, you can view the saved group. Save the WeChat group: 1. Select the group you want to save, top right [...] 2. Open in the chat message [Save to address book] 3. On the main WeChat interface, tap [Address Book]-[Group Chat] to view

How to view the Amap Help Center_How to view the Amap Help Center How to view the Amap Help Center_How to view the Amap Help Center Apr 01, 2024 pm 05:26 PM

1. We first open the Gaode map. 2. Then click (My) in the lower right corner of the Amap homepage and then click Settings in the upper right corner. 3. Finally, you can see the help center of Amap.

See all articles