Blog to learn about SQL, database, Oracle, SQL Server, MySQL, PostgreSQL concepts and much more.
Sunday, May 26, 2024
How to convert DATETIME to VARCHAR in Microsoft SQL Server? Example Tutorial
Saturday, May 25, 2024
What is Primary key in SQL? How to choose Primary key in table? Example
If you've ever dealt with databases, you've almost certainly come across the term - primary key (PK). And if you're following this series to learn about databases, this piece should help you understand what the PK is all about. Even if you're a database specialist, you could learn something new or improve your skills. So sit back, relax, and let's get started with the PKs.
Tuesday, May 14, 2024
How to get rows between two dates in Microsoft SQL Server? MSSQL Example
Solution : You can get the records between two dates in SQL SERVER by using dates in WHERE clause, for example, below query will return all the courses for which start date is greater than 2025/01/01 and less than 2025/01/31
Tuesday, May 7, 2024
How to Remove duplicate rows from table in SQL Server using temp table? Example
Wednesday, May 1, 2024
Difference between Primary key Unique key in Database SQL
Hello friends, both primary key and unique key are two important concepts in a relational database which are used to uniquely identify a row in a table. For example, EmployeeId is often primary key in Employee table which can uniquely identify any employee which is denoted by a row in Employee table. Similarly, a employee can also be identify with EmployeeName if there is no duplicate but if its not primary key then we call it a unique key. While both primary key and unique keys can identify a row uniquely but there is some subtle difference between them which we will see in this article.