Constaint allows us to set specific rules for data in a table. For example; to make sure that the data in a column is …
Read More »TSQL
NOT NULL Constraint in SQL Server(TSQL)
We can use “NOT NULL Constraint” to prevent values in a column from containing null data. Example: In the following example, when creating a …
Read More »Like Operator in SQL Server(TSQL)
We use the LIKE operator with WHERE clause. I suggest you read the following article about WHERE clause. “Where Clause in SQL Server and SQL …
Read More »HAVING Clause in SQL Server and Difference Between WHERE Clause(TSQL)
HAVING Clause is used for filtering like WHERE Clause. The difference is that while WHERE Clause is filtering on ungrouped data, HAVING Clause filters on …
Read More »SEQUENCE in SQL Server(TSQL)
Sequence is a table-independent structure similar to the identity logic in SQL Server. You can use the sequence in more than one table. You …
Read More »How To Concatenate Query Results in SQL Server(TSQL)
The other day I had to concatenate a query result. In this article, I’m going to tell you how to do this through an example. …
Read More »How To Delete the Last Character of a String in TSQL(DATALENGTH and LEFT Functions)
When developing code in TSQL, we may need to delete the last character of a string in some cases. The other day, I used the …
Read More »INTERSECT Operator in SQL Server(TSQL)
We can use the SQL INTERSECT Operator between two SQL Statement. This operator returns the intersection of the first SQL Statement and the second SQL …
Read More »EXCEPT Operator in SQL Server(TSQL)
We can use the SQL EXCEPT Operator between two SQL Statement. It allows us to return records that exist in the first SQL Statement, but …
Read More »SQL Server Loops and Conditions(TSQL)
In this article, we will examine the loops and conditions we use in TSQL. Conditions in TSQL: IF Statement in SQL Server: If the …
Read More »