CHECK Constraint Errors with Single vs Double Quotes in Azure Data Studio

Kurczyńska Jolanta (STUD) 5 Reputation points
2025-01-15T18:02:45.8+00:00

I'm following the 'Design a Performant Data Model in Azure SQL Database with Azure Data Studio' module and have an issue with adding table constraints (Unit 7). In the Expression field in Azure Data Studio I'm putting as instructed: [card_type] = 'weapon' OR [card_type] = 'armor' OR [card_type] = 'spell' OR [card_type] = 'monster' but get the error from the picture. User's image

Weirdly while I'm using the single quotation marks, the error prints them as double quotation marks. It actually accepts the expression if I change it to: [card_type] = "weapon" OR [card_type] = "armor" OR [card_type] = "spell" OR [card_type] = "monster" but throws an error later while trying to publish the database:User's image I've followed the rest of the tutorial closely and kept all the names and settings as instructed so I really struggle to understand where the issue could be coming from. Would appreciate any help :))

This question is related to the following Learning Module

Azure Data Studio
Azure Data Studio
A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.
131 questions
Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
2,000 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.