Sql Server management studio how to auto capitaliz

2020-03-01 08:58发布

Is there any FREE "build-in" way to capitalize the "keywords" in the SQL 2005/2008 management studio when you write a sql query?

i.e

truncate table x

should be automatically changed to:

TRUNCATE TABLE x

4条回答
家丑人穷心不美
2楼-- · 2020-03-01 09:01

There is no built in 'intellisense' in SQL Server 2005 (there is in 2008) but Redgate do an add-in for exactly this and more. It will auto-complete table names, columns, add square brackets, re-format stored procs etc, and it works well:

http://www.red-gate.com/products/SQL_Refactor/index.htm

查看更多
女痞
3楼-- · 2020-03-01 09:09

I found a hidden gem for auto upper/lower case formatting and indenting in SSMS that I will forever use. No more "New Query".

Rt-Click table name within Object Explorer | Edit Top 200 Rows | QueryDesigner menu option | Pane | SQL. Write or drop in some ugly, non formatted SQL. QueryDesigner | Verify SQL Syntax will UC reserved words and indent for you.

查看更多
【Aperson】
4楼-- · 2020-03-01 09:10

the intellisense in the 2008 management studio will do this as well as long as you are connected to a SQL 2008 database.

You can change the case you prefer to upper or lower under Tools / Options / Text Editor / Transact-SQL / IntelliSense

查看更多
老娘就宠你
5楼-- · 2020-03-01 09:19

You can use New Query and type in your SQL in lower case in the editor. To change keywords to upper case, select the SQL then press Ctrl + Shift + Q. The Query Designer will open. Highlight the SQL and then right click to bring up menu and choose verify SQL Syntax which will upper case keywords and format the SQL.

查看更多
登录 后发表回答