一、SQL Server

1. 在数据库中查看某个字段或某张表的信息,Segment_Name 和 Table_Name 可模糊和准确查询:

 select * from INFORMATION_SCHEMA.COLUMNS
where COLUMN_NAME like '%<Segment_Name>%' select * from INFORMATION_SCHEMA.TABLES
where TABLE_NAME like '%<Table_Name>%'

2. 使用命令查看某个Procedure或Function的具体内容,当然也可以视图查看:

sp_helptext <Pro_Name or Fun_Name>    (直接写Pro_Name or Fun_Name,不需要加引号)

sp_who2 (查看数据库中表的相关信息)

3. 5个最常用的系统存储过程

There are a number of documented and undocumented system stored procedures in MS SQL Server that are helpful for every web developer working with databases. From the developer’s perspective, here’s a list of 5 System stored procedures that are my favorite.

1. sp_help

Purpose:
sp_help gives information about database objects. If you wanted to quickly know the structure of a table but are too lazy to look for the schema diagram or to dig for the table you are interested in within the Object explorer, sp_help is here to help Syntax:
It can be used without parameters to get the information of objects in the database.
It can be used with a parameter to get the information of a particular object Examples:
On the Adventure Works database:
Executing sp_help would yield the following recordset Executing sp_help ‘Person.Address’ yields the following recordset Note that it is not required to enclose the object name within single quotes unless the object name has a dot in it. sp_help '<Table_Name>' 2. sp_helptext Purpose:
sp_help gives definition information of objects such as system stored procedures, user defined stored procedures, user defined functions, triggers etc. Syntax:
viewplaincopy to clipboardprint?
sp_helptext <Name of the object> Example:
On the Adventure Works database:
Executing a sp_helptext 'dbo.uspGetBillOfMaterials' yields the following definition of the user defined stored procedure 3. sp_MSforeachtable Purpose:
Caution – This is an undocument stored procedure and should not be relied on. It is not listed in SQL BOL and should be used at your own risk.
This is a very useful stored procedure for executing a command for ALL the tables in the database. Say you wanted to get the number of rows in all the tables in your database, you could write: Example:
viewplaincopy to clipboardprint?
EXEC sp_MSforeachtable 'SELECT ''?'', COUNT(*) FROM ?'
The literal ?is used as a token to replace the table name. The output for the Adventure Works database is shown below For each table in the database, it would list the table name and the number of rows in that table.
Want to find out how much space is used by each table in your database. Try this:
viewplaincopy to clipboardprint?
sp_MSforeachtable 'execute sp_spaceused @objname = ''?'' '
More information on sp_spaceused later in this article. 4. sp_depends Purpose:
Ever wanted to make a change to a table but were not sure what other objects are dependent on this table? There could be views or stored procedures that could break due to this change. In situations like this, sp_depends come to the rescue. Syntax:
viewplaincopy to clipboardprint?
sp_depends <Name of the object> Example:
In the Adventure Works database, say I wanted to find out all the objects that are dependent on the Person.Address table.
By executing sp_depends 'Person.Address', the result set is as shown sp_depends '<Table_Name>' 5. sp_spaceused Purpose:
This is a simple stored procedure that gives information on the size of the database or the database objects Syntax:
If it is used without parameters, it would return the database information
viewplaincopy to clipboardprint?
sp_spaceused
If it is used with a parameter, it would return the information on the object
viewplaincopy to clipboardprint?
sp_spaceused <Name of the object> Example:
In the Adventure Works database, executing the sp_spaceused without parameters gives the following result Executing the sp_spaceused ‘Person.Address’ (on a table object) sp_spaceused '<Table_Name>' Conclusion This article gives a brief description on 5 useful system stored procedures that developers can use on a daily basis. Happy coding!

4. Reset DB common When DB state Recovery State.

  ALTER DATABASE DBNAME SET OFFLINE WITH ROLLBACK IMMEDIATE
  ALTER DATABASE DBNAME SET ONLINE WITH ROLLBACK IMMEDIATE

二、 HTML + JavaScript + CSS

1. 在web开发经常会遇到如: &nbsp; 这样的字符。它其实是Html将一些特殊字符(Html语法字符)的一种表达方式。

下面列举几个常用字符:

&nbsp;  空格

&amp;   &

&lt;       <

&gt;      >

&quot;   "

&qpos;   '

软件开发常用快捷键 & 命令总结的更多相关文章

  1. 软件开发常用Linux命令

    解压缩 tar -zxvf xxx.tar.gz 文件显示及查找常用于分析log //显示file中包含aaa的行 cat <file>|grep aaa 查看cpu memory基本信息 ...

  2. C#(Net)软件开发常用工具汇总,提高你的开发效率

    C#(Net)软件开发常用工具汇总,提高你的开发效率 写代码也要读书,爱全栈,更爱生活.每日更新原创IT编程技术及日常实用技术文章. 我们的目标是:玩得转服务器Web开发,搞得懂移动端,电脑客户端更是 ...

  3. Hadoop基础-HDFS集群中大数据开发常用的命令总结

    Hadoop基础-HDFS集群中大数据开发常用的命令总结 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 本盘博客仅仅列出了我们在实际生成环境中常用的hdfs命令,如果想要了解更多, ...

  4. Linux软件开发常用的软件包(持续更新中)

    下面是Linux开发常用的软件包: 软件包的名称 作用描述 安装方式 build-essential   sudo apt-get install build-essential policycore ...

  5. VS Code 前端开发常用快捷键插件

    一.vs code 的常用快捷键 1.注释:a) 单行注释:[ctrl+k,ctrl+c] 或 ctrl+/ b) 取消单行注释:[ctrl+k,ctrl+u] (按下ctrl不放,再按k + u) ...

  6. Windows开发常用快捷键

    毕业后一直在从事Windows开发工作,掌握些常用的Windows快捷键可以大大的提升工作效率,同时还能秀一波操作.本文记录在工作中常用的Windows快捷键,以及VS常用快捷键.掌握了这些键盘操作, ...

  7. iOS开发常用快捷键

    二. Xcode基本快捷键 新建项目 Shift + CMD + N 项目中新建文件 CMD + N 运行 CMD + R 编译 CMD + B 停止运行 CMD + . 清除缓存 Shift + C ...

  8. Android studio开发常用快捷键

    最常用快捷键 1.Ctrl+E  可以显示最近编辑的文件列表 2.Shift+Click(点击)  可以关闭文件 3.Ctrl+[或者ctrl+]  可以跳到大括号的开头结尾 4.Ctrl+Shift ...

  9. 软件开发常用的linux命令心得(ubuntu为例)

    软件开发过程中难免要经常对主机进行配置或者部署等操作,想到一些就写一些了,以后再更新 解压命令: a.如果是tar文件,则直接用 “tar zxvf 文件名”: b.如果是zip文件,用 “unzip ...

随机推荐

  1. [转] Oracle sql 查询突然变慢 -- 案例分析

    转自:http://jingyan.baidu.com/article/8275fc868ce57946a03cf692.html 一条sql突然执行变慢,耗时9秒,应用是不能改的,只能从数据库方面下 ...

  2. git 常见命令

    查看.添加.提交.删除.找回,重置修改文件 git help <command> # 显示command的help git show # 显示某次提交的内容 git show $id gi ...

  3. nexus 搭建maven本地仓库

    使用Nexus搭建Maven本地仓库   阅读目录 序 Nexus 序 在工作中可能存在有些开发机器不能上网,大量的机器获取jar包会导致公司网络很慢,还有时候公司会自己发布自己的项目版本,其他的项目 ...

  4. h5页面唤起app(iOS和Android),没有安装则跳转下载页面

    浏览器和app没有通信协议,所以h5不知道用户的手机释放安装了app.因此只能是h5去尝试唤起app,若不能唤起,引导用户去下载我们的app. 微信里屏蔽了 schema 协议,如果在微信中打开h5, ...

  5. linux driver编译环境搭建和命令

    首先将ubuntu14.04的内核升级到内核3.18.12. 其次,Ubuntu14.04上驱动编译命令 $ sudo make -C ~/linux-3.18.12/ M=`pwd` modules ...

  6. Regular Expression Matching leetcode

    递归方法运行时间过长.考虑使用动态规划的方法. 代码如下: bool isMatch(string s, string p) { int i,j; int m=s.size(); int n=p.si ...

  7. MJPhotoBrowser BUG修复

    崩溃在loading.progress = (float)receivedSize/expectedSize; 分析:MJPhotoView 执行了hide移除了MJPhotoLoadingView, ...

  8. WebApi Put方法出现MethodNotAllowed解决方法

    WebApi Put方法提交数据的时候总提示MethodNotAllowed,在网上查了很多资料才发现是因为IIS安装了一项服务“WebDAV”,在IIS中把“WebDAV”前面的勾去掉,重新启动电脑 ...

  9. Jmeter学习

    网址: http://www.ltesting.net/ceshi/open/kyxncsgj/jmeter/ http://www.cnblogs.com/TankXiao/p/4059378.ht ...

  10. 从Elo Rating System谈到层次分析法

    1. Elo Rating System Elo Rating System对于很多人来说比较陌生,根据wikipedia上的解释:Elo评分系统是一种用于计算对抗比赛(例如象棋对弈)中对手双方技能水 ...