SQL Server. Navicat Navicat 12
Tangazo
Tangazo
Maintain Objects
Navicat provides a complete solution for maintaining PostgreSQL objects.
1. In the main window, select objects in the Navigation pane or the Objects tab.
2. Right-click the selected objects.
3. Choose Maintain, and then choose a maintain option the from the pop-up menu.
4. Results show in a pop-up window.
Database
Option
Allow
Disallow
Analyze Database
Vacuum Database
Reindex Database
Description
Users can connect to the database.
No users can connect to the database.
Collect statistics about the database.
Garbage-collect and optionally analyze the database.
Recreate all indexes within the database.
Table / Materialized View
Option
Analyze Tables / Analyze
Materialized Views
Vacuum Tables / Vacuum
Materialized Views
Reindex Tables / Reindex
Materialized Views
SQL Server
Description
Collect statistics about the contents of the table.
Garbage-collect and optionally analyze the table.
Recreate all indexes of the table.
Databases & Schemas
To start working with the server objects, you should create and open a connection. If the server is empty, you need to create a new database and/or a new schema.
Create a new database
1. In the Navigation pane, right-click a connection and choose New Database.
2. Enter the database properties in the pop-up window.
Edit an existing database
1. In the Navigation pane, right-click a database and choose Edit Database.
50
2. Edit the database properties in the pop-up window.
Create a new schema
1. In the Navigation pane, right-click a database and choose New Schema.
2. Enter the schema properties in the pop-up window.
Edit an existing schema
1. In the Navigation pane, right-click a schema and choose Edit Schema.
2. Edit the schema properties in the pop-up window.
Tables
Tables are database objects that contain all data in a database. A table is a set of rows and columns, and their intersections are fields. In the main window, click Table to open the table object list.
There are two ways to open a table with graphical fields, right-click a table and choose:
Option Description
Open Table Navicat loads all your BLOB fields (images) while opening the table.
Open Table (Quick) Faster performance for opening the graphical table, as BLOB fields (images) will not be loaded until you click on the cell. (It is invisible by default until you hold down the SHIFT key when right-clicking the table.)
You can create a table shortcut by right-clicking a table in the Objects tab and select Create Open Table Shortcut from the pop-up menu. This option is used to provide a convenient way for you to open your table for entering data directly without activating the Navicat main window.
To empty a table, right-click the selected table and choose Empty Table from the pop-up menu.
Table Designer
Table Designer is the basic Navicat tool for working with tables. It allows you to create, edit and drop table's fields, indexes, foreign keys, and much more.
In the Fields tab, you can search a field name by choosing Edit -> Find or pressing CTRL+F. When creating a new table, you are allowed to insert fields or rearrange the order of the fields.
Note: The tabs and options in the designer depend on the server version.
Table Viewer
When you open a table, Table Viewer displays data as a grid. Data can be displayed in two modes: Grid View and
Form View. See Data Viewer for details.
51
Views
A view allows users to access a set of tables as if it is a single table. You can use views to restrict access to rows. In the main window, click View to open the view object list.
You can create a view shortcut by right-clicking a view in the Objects tab and select Create Open View Shortcut from the pop-up menu. This option is used to provide a convenient way for you to open your view directly without activating the Navicat main window.
View Designer
View Designer is the basic Navicat tool for working with views. You can edit the view definition as SQL statement
(SELECT statement it implements) in the Definition tab. To customize the view of the editor and find out more features
choose File -> Import SQL.
Button
Preview
Explain
View Builder
Description
Preview the data of the view.
Show the Query Plan of the view.
Build the view visually. It allows you to create and edit views without knowledge
of SQL. See SQL Builder for details.
Format the codes with the Beautify SQL settings in Editor.
Beautify SQL
Hint: You can choose to show the preview results below the editor or in a new tab by selecting View -> Show Result
-> Below Query Editor or In a New Tab.
View Viewer
When you open a view, View Viewer displays data as a grid. Data can be displayed in two modes: Grid View and Form
View. See Data Viewer for details.
Procedures / Functions
Procedures and functions are schema objects that consist a set of SQL statements and stored in the server. In the main window, click Function to open the function object list.
Function Wizard
Click New Function from the object toolbar. Function Wizard will pop up and it allows you to create a procedure/function easily.
1. Specify the Name of the routine and select the type of the routine: Procedure or Function.
2. Define the parameters. Set the Name, Type Schema, Type, Default Value, Output and/or Read Only under the corresponding columns.
3. If you create a function, select the Function Type from the list. Then, choose the Schema and the Return
Type if necessary.
52
4. Set the advanced options.
Hint: Once uncheck the Show wizard next time option, you can go to Options to enable it.
Function Designer
Function Designer is the basic Navicat tool for working with procedures/functions. You can enter a valid SQL statement in the Definition tab. To customize the view of the editor and find out more features for SQL editing, see
The Code Outline pane displays information about the procedure/function including parameters, code body, etc. If the
Code Outline pane is hidden, choose View -> Code Outline.
Hint: Available only in Non-Essentials Edition.
Button Description
Refresh the code outline.
Show the detail view of the code outline.
Turn mouse over highlight on or off.
Expand the selected item.
Collapse the selected item.
Toggle sorting by position.
Results
To execute the procedure/function, click Execute on the toolbar. If the SQL statement is correct, the statement will be executed and, if the statement is supposed to return data, the Result tab opens with the data returned. If an error occurs while executing the procedure/function, execution stops, the appropriate error message is displayed. If the procedure/function requires input parameters, the Input Parameter dialog will pop up. Check the Raw Mode option to pass the inputted values to the procedure/function without quotation marks.
Note: Navicat supports to return 10 result sets.
Other Objects
Navicat also allows you to manage other SQL Server objects: Index, Synonym, Trigger, Backup Device, Linked Server,
Server Trigger, Assembly, Database Trigger, Partition Function and Partition Schema. In the main window, click
Others and select an object to open the object list.
Maintain Objects
Navicat provides a complete solution for maintaining SQL Server objects.
1. In the main window, select objects in the Navigation pane or the Objects tab.
2. Right-click the selected objects.
3. Choose Maintain, and then choose a maintain option the from the pop-up menu.
53
Pakua
Tangazo