constraint

Add constraint without checking existing data

In this post “Add constraint without checking existing data” we are going to learn how we can add a constraint on a column which already has invalid data. We create constraints to automatically enforce the integrity of the database. Using constraints we can define the rules for valid set of values for a given column. Let’s learn […]

Add constraint without checking existing data Read More »

Allow only alphanumeric characters in a column

One of my colleague asked me a question that how to “allow only alphanumeric characters” in a column. Below is the exact question: How can i stop accepting any non-alphanumeric characters during DML operations in a column of a table? To achieve this, we can follow below steps. There may be more different ways other than

Allow only alphanumeric characters in a column Read More »