Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidhintelmann/data-access
Pure go lang example for connecting and querying a local instance of Microsoft SQL Server on Windows
https://github.com/davidhintelmann/data-access
go golang msql mssql mssql-database mssql-server
Last synced: about 2 months ago
JSON representation
Pure go lang example for connecting and querying a local instance of Microsoft SQL Server on Windows
- Host: GitHub
- URL: https://github.com/davidhintelmann/data-access
- Owner: davidhintelmann
- License: mit
- Created: 2023-05-01T05:04:32.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-08-29T21:00:11.000Z (over 1 year ago)
- Last Synced: 2024-10-12T07:41:15.641Z (3 months ago)
- Topics: go, golang, msql, mssql, mssql-database, mssql-server
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example using Go Lang to Query Microsoft SQL
This repo contains an example of how one can query a local instance of Microsoft SQL using the [Go programming language](https://go.dev/)
## Dependencies and Installation
Using this repo requires a bit of setup:
- Requires Go 1.8 or above
- Download developer version of [Microsoft SQL](https://www.microsoft.com/en-us/sql-server/sql-server-downloads)
- Requires in [ODBC driver](https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16) which should have been installed with MS SQL
- Installing this [pure Go](https://github.com/microsoft/go-mssqldb) driver for Go's `database/sql` package
- repo above is forked from [denisenkom](https://github.com/denisenkom/go-mssqldb)**Optional**
- [Download SQL Server Management Studio (SSMS)](https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver16)
- Need sample data to query and one can restore a `.bat` backup for the [Adventure Works](https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver16&tabs=ssms) OLTP database