Skip to content

Commit a21f40d

Browse files
committed
update 2
1 parent c9519a4 commit a21f40d

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

docs/t-sql/statements/delete-transact-sql.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ DELETE
7474
```
7575

7676
```
77-
-- Syntax for Azure Synapse Analytics (formerly SQL DW)
77+
-- Syntax for Azure Synapse Analytics (formerly SQL Data Warehouse)
7878
[ WITH <common_table_expression> [ ,...n ] ]
7979
DELETE [database_name . [ schema ] . | schema. ] table_name
8080
FROM [database_name . [ schema ] . | schema. ] table_name
@@ -496,7 +496,7 @@ SELECT TOP 1 1 FROM tableB tb WHERE tb.col1 = tableA.col1
496496
```
497497
498498
### P. Delete based on the result of joining with another table
499-
This example shows how to delete from a table based on the result of joining wiht another table.
499+
This example shows how to delete from a table based on the result from joining wiht another table.
500500
```
501501
CREATE TABLE dbo.Table1
502502
(ColA int NOT NULL, ColB decimal(10,3) NOT NULL);
@@ -509,26 +509,12 @@ INSERT INTO dbo.Table1 VALUES(1, 10.0), (1, 20.0);
509509
INSERT INTO dbo.Table2 VALUES(1, 0.0);
510510
GO
511511
512-
UPDATE dbo.Table2
513-
SET dbo.Table2.ColB = dbo.Table2.ColB + dbo.Table1.ColB
514-
FROM dbo.Table2
515-
INNER JOIN dbo.Table1
516-
ON (dbo.Table2.ColA = dbo.Table1.ColA);
517-
GO
518-
519-
SELECT ColA, ColB
520-
FROM dbo.Table2;
521-
GO
522-
523512
DELETE dbo.Table2
524513
FROM dbo.Table2
525514
INNER JOIN dbo.Table1
526515
ON (dbo.Table2.ColA = dbo.Table1.ColA)
527516
WHERE dboTable2.ColA = 1;
528-
529517
```
530-
```
531-
532518
## See Also
533519
[CREATE TRIGGER &#40;Transact-SQL&#41;](../../t-sql/statements/create-trigger-transact-sql.md)
534520
[INSERT &#40;Transact-SQL&#41;](../../t-sql/statements/insert-transact-sql.md)

0 commit comments

Comments
 (0)