# MS-SQL connector as Reader and Writer

## MSSQL Connector as a Reader

The MSSQL Connector as a `Reader` reads from the field defined in `Reader>Source` fields once the `Reader stream` is selected.

## MSSQL Connector as a Writer

The MSSQL Connector as a `Writer` performs the writing according to the field mapping and the `Writer mode`.&#x20;

![](https://2351945889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVoxOh7gdjWdmqooFdYBY%2Fuploads%2FX7UfGJKDLGGIRUfJmx4G%2FWriter_DataDest_Conn.png?alt=media\&token=d4671391-4b34-4ce2-8a6f-3e7605e95d7e)

The `Writer mode` allows the user to define the data to be written in one of the following ways:

1. `Append`: This setting defines that the data in the source will be added to the destination without affecting the existing data in the destination. This option is selected by default.
2. `Add & Update`: This setting defines that if a record is not present according to the match key, the record should be added, and the destination data set is updated accordingly. If the record is found, then the record is updated.
3. `Delete`: This setting defines that according to the match key, data is deleted from the destination data source.
4. `Sync` (Synchronize): This setting defines that data is synchronized between source and destination according to the match key. \
   For example, if a record is present in the source file and not in the target destination, the target destination is updated to sync with the source file. Similarly, if a record is not present in the source file and is present in the target destination, the same record in the target destination will be deleted.

![](https://2351945889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVoxOh7gdjWdmqooFdYBY%2Fuploads%2Fg8WRg4SnMpsZVAv41yUB%2FWriter_DataDest_Add.png?alt=media\&token=f0efdf00-91aa-4215-bd75-25f9d77944cb)
