Skip to content

Instantly share code, notes, and snippets.

View MattiasSp's full-sized avatar

Mattias Spångmyr MattiasSp

View GitHub Profile
@MattiasSp
MattiasSp / populate_geometry_columns_table.sql
Last active October 30, 2019 10:01 — forked from christippett/populate_geometry_columns_table.sql
MS SQL stored procedure to populate `geometry_columns` table. This table is used by QGIS to identify tables with spatial data.
-- =============================================
-- Author: Chris Tippett
-- Create date: 2014-08-12
-- Description: Detect columns with geometry datatypes and add them to [dbo].[geometry_columns]
-- =============================================
CREATE PROCEDURE [dbo].[Populate_Geometry_Columns] @schema VARCHAR(MAX) = '', @table VARCHAR(MAX) = ''
AS
BEGIN
SET NOCOUNT ON;