Tag - SQL

Data Engineer vs. Data Scientist

Data science jobs have been in great demand in recent years, with the Bureau of Labor Statistics expecting a 22% increase in job growth from 2020 to 2030—much faster than the typical growth of other occupations. This need shows no signs of decreasing as organizations continue to focus on generating,...

Delete Duplicate Rows in SQL Server

I was working on a legacy Database with tables that has a lot of records, more than like 1M records.I noticed some duplicate rows there and I had to do something about this.After some research I came up with the following code that would delete duplicated rows in a table.DELETE...

Some tips for improving the performance of SQL Server queries

When I observe performance optimizations for online apps, I often see them done at the application layer or by validating the index existence on a database table field column (s). The optimization of SQL queries receives very little attention. Even experienced architects and developers have a tendency to overlook the...

Differences between SQL and NoSQL

1.LanguageSQL databases: SQL databases use structured query language (SQL) for defining and manipulating data. This is extremely powerful: SQL is one of the most many-sided and widely-used options available, making it a safe choice and especially great for complex queries. But it can be restrictive. SQL requires that you use predefined schemas to...

How to execute a T-SQL command to every table in SQL Server database

sp_MSforeachtable is a stored procedure that is mostly used to apply a T-SQL command to every table, iteratively, that exists in the current database.Examples on how to use it:1-Perform an unconditional reindex over all tables in the database:EXEC sp_MSforeachtable 'DBCC DBREINDEX(''?'')'2-Truncate all tables in the database:EXEC sp_MSforeachtable 'TRUNCATE TABLE ?'3-Get...

How to use SQL Membership Provider in ASP.NET

The ASP.NET membership feature provides secure credential storage for application users.We will use the following:Web Page Named Login.aspx and another Web Page named CreateUser.aspxLogin Control.Create User Wizard Control.Steps:1- Configure Forms Authentication in Web.config FileTo configure forms authentication, set the <authentication> element's mode attribute to "Forms" and then configure your application's...