How to export a table from sql database

Sql how to export the table structure

1. How to export the table structure of SQLServer

Method 1:SQLServer2008 comes with the export function “Tasks→Generate Scripts”

1

Open sqlserver2008, select the database you want to export

2

Right-click on the database, select [Tasks] → [Generate Script]

3

Enter the introduction page, directly click on the [Next] on it

To get to the next page, click on the [Next].

4

Select object page, you can choose to export the entire database script, or part of the table, very flexible

5

Enter the setup script option, first of all, the path to the export of the selected

Prevent a moment forget to set the path and can’t find where to export to

Then click [Advanced]

6

On the Advanced Options page, find the [Data types to script] on the left side, and then select [Schema and data] in the drop-down box on the right side

This step must not be forgotten! Don’t forget! Unless you don’t want data, just the structure of the table.

After that, go back to the Writing Options page and click Next

7

To summarize the page, you can do a simple check to see if the previous choices are the ones you want

Check that there are no errors, click Next, and then start execution

<

8

Well, the export is successful \(^o^)/

Quickly go to the path you set to find the script

END

Method 2: Dynamic Soft Code Generator

1

Open Dynamic Soft Code Generator and connect to the data number

2

Click on the right side of the [Database Script Generator]

3

Select the database you want to export

4

.

Select the path and name to save, then select the tables to export, you can choose all or part of the table

Set up, click [Generate]

5

OK, is not it SoEasy

2. How to export all the table structure of a database

1. The complete export of the entire database table structure that dmp file method:

Tools–> ExportTables, select OracleExport default options can be, in the Outputfile select an output target

Click Export, you can Export table structure

2. Export table data:

Tools–>ExportTables: Select SQLInserts encountered a large field (clob, blob) will be a problem to export out of the table, where you can

Select the table that you need to export. In the Outputfile, select the export target, click Export to export, there are several options

You can remove all the optional direct export

3. Export all the database or the selected table of the database table script:

Tools–& gt;ExportUserObjects remove the following three include * optional, select Singlefile) in the Outputfile

Select the output target, click Export can be

3. How to export the structure of the SQL database table to Word

Export method steps are as follows:

Download and install the code generator

Open the software, click on the upper-left corner of the [Add Server Registration]

Select the type of server you want to add, that is, the type of database you are using

In the Server Connection Parameter setting interface, set the appropriate parameters

Usually, the database is local, so the server name can be written with a dot

And then enter the login password of the database can be connected

Click Connect to Server, so that the code generator connects to the database server

This will allow you to access the data in the database normally

Click on [Database Documentation Generator] on the right to open the Generate Database Documentation dialog box

Select the database first, and then select the specific tables you want to export

Finally, click Generate to start generating the documentation

<

The next step is to wait for it

After generating a good document, the document automatically opens, save it on it

4. How to export the structure of the table has been imported into the structure of the sql database table

Open the sqlserver2008, select the database you want to export

In the database right-click, select [Tasks]. right-click on the database, select [Tasks] → [Generate Script]

Enter the introduction page, directly click [Next] on it

Select the object page, you can choose to export the script of the entire database, or some of the tables, it’s very flexible

Enter the setup script options, first of all, the export of the

To prevent you from forgetting to set the path and not being able to find where to export to

Then click Advanced

On the Advanced Options page, on the left hand side, find “Data Types to Script”, and then on the right hand side of the drop-down box, select “Schema and Data”

This step allows you to select a database to export to. p>

Don’t forget this action step! Unless you don’t want data, just the structure of the table.

After returning to the page of writing options, click [Next]

To summarize the page, you can do a simple check to see if the previous selection is what you want

Check that there is no error, click [Next], the start of the implementation of the

Well, the export has succeeded ah! (^o^)/

Go to the path you set to find the script!

How to export query results from SQLserver 2008 to Excel sheet?

1, open the sql client tool Navicat, click to check ‘Queries’ under Database on the left.

2, and then click the + button to create a new query window.

3, in the editor, the first to write a regular query sql statement, Select the field, that is, the field output in excel.

4, then add ‘Intooutfile’ + path to save the excel file before the From keyword, as shown.

5. This will start executing this sql statement. Click on the Execute button below.

6, the execution process, if there is no permission problems, you can save the folder, you can see this excel file. It’s done.