Skip to content

Commit 44ea885

Browse files
authored
Merge pull request #6981 from morozov/sqlserver-cleanup-like-wildcards
Clean up SQL Server LIKE wildcard characters
2 parents 47dd669 + 5086480 commit 44ea885

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Platforms/SQLServerPlatform.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,9 +1276,14 @@ public function columnsEqual(Column $column1, Column $column2): bool
12761276
=== $this->getDefaultValueDeclarationSQL($column2->toArray());
12771277
}
12781278

1279+
/**
1280+
* The <code>[</code> character is used in SQL Server's extended pattern syntax to define character ranges or sets.
1281+
*
1282+
* @link https://learn.microsoft.com/en-us/sql/t-sql/language-elements/like-transact-sql#pattern
1283+
*/
12791284
protected function getLikeWildcardCharacters(): string
12801285
{
1281-
return parent::getLikeWildcardCharacters() . '[]^';
1286+
return parent::getLikeWildcardCharacters() . '[';
12821287
}
12831288

12841289
protected function getCommentOnTableSQL(string $tableName, string $comment): string

0 commit comments

Comments
 (0)