How to JOIN

Today I am writing a little blog about SQL joins First we have to create two tables and insert some very simple data for testing. CREATE TABLE [dbo].[TableLeft]([Key] [varchar](50) NULL, [LeftValue] [varchar](50) NULL) CREATE TABLE [dbo].[TableRight]([Key] [varchar](50) NULL, [RightValue] [varchar](50) NULL) INSERT [dbo].[TableLeft] ([Key], [LeftValue]) VALUES (N'3', N'LeftValue_1') INSERT [dbo].[TableLeft] ([Key], [LeftValue]) VALUES (N'1', [...]

By |2015-07-09T22:56:56+02:00June 25th, 2015|SQL Blog @en|0 Comments

Delete duplicates from table

I would like to write a little post about deleteing duplicates from a table. Is is a wide issue and there are many different possibilities for doing that. The most easy one is when there is a primary key defined in the table. CREATE TABLE [dbo].[TableDuplicatesA] ([ID] [int] IDENTITY(1,1) NOT NULL, [Key] [varchar](50) NOT [...]

By |2015-06-20T20:38:04+02:00June 15th, 2015|SQL Blog @en|0 Comments