In software development, the use of a good tool can greatly improve development efficiency. Since SQL Server is difficult to install and vulnerable to damage, it affects development efficiency. I borrowed navicat from a friend and found it to be very practical. Function.
Navicat is a powerful MySQL database management and development tool. Navicat provides a set of powerful and sophisticated tools for professional developers, but it is easy to learn for new users. Navicat has been praised as the market leader and the best-used MySQL user interface management tool.
In addition to common database and table building, as well as query functions, it also supports table printing, report query, report printing, data model generation and other functions, as follows Introducing two common functions: 1. Export all table structures, use sql statements to query all table structures, select the export table type, and click to start exporting.
SELECT 表名 = CASE WHEN A.colorder = 1 THEN D.name ELSE '' END, 表说明 = CASE WHEN A.colorder = 1 THEN isnull(F. VALUE, '') ELSE '' END, 字段序号 = A.colorder, 字段名 = A.name, 字段说明 = isnull(G.[value], ''), 标识 = CASE WHEN COLUMNPROPERTY(A.id, A.name, 'IsIdentity') = 1 THEN '√' ELSE '' END, 主键 = CASE WHEN EXISTS ( SELECT 1 FROM sysobjects WHERE xtype = 'PK' AND parent_obj = A.id AND name IN ( SELECT name FROM sysindexes WHERE indid IN ( SELECT indid FROM sysindexkeys WHERE id = A.id AND colid = A.colid ) ) ) THEN '√' ELSE '' END, 类型 = B.name, 占用字节数 = A.Length, 长度 = COLUMNPROPERTY(A.id, A.name, 'PRECISION'), 小数位数 = isnull( COLUMNPROPERTY(A.id, A.name, 'Scale'), 0 ), 允许空 = CASE WHEN A.isnullable = 1 THEN '√' ELSE '' END, 默认值 = isnull(E. TEXT, '') FROM syscolumns A LEFT JOIN systypes B ON A.xusertype = B.xusertype INNER JOIN sysobjects D ON A.id = D.id AND D.xtype = 'U' AND D.name <> 'dtproperties' LEFT JOIN syscomments E ON A.cdefault = E.id LEFT JOIN sys.extended_properties G ON A.id = G.major_id AND A.colid = G.minor_id LEFT JOIN sys.extended_properties F ON D.id = F.major_id AND F.minor_id = 0 --where d.name='OrderInfo' --如果只查询指定表,加上此条件 ORDER BY A.id, A.colorder
2. Print table model
# Select New Model, drag the table that needs to be exported into the table on the right to display the table structure. Adjust the page size in the lower right corner to zoom the page.
Summary:
The use of tools should be the same as learning. First have macro control. When you need a certain function, use some Search tools, browse manuals, etc. to check how to use the software.
navicat online manual: http://www.navicat.com.cn/manual/online_manual/cn/navicat/win_manual/index.html The above is the detailed explanation of the MySQL navicate function. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!