SQL Study (edit)
SQL Interview Questions
https://www.interviewbit.com/sql-interview-questions/
What C# Datatype is mapped with which Datatype in SQL Server?
https://www.dotnettricks.com/learn/entityframework/entity-framework-interview-questions
Entity Framework Interview Questions
https://www.fullstack.cafe/blog/entity-framework-interview-questions
Example of Code First Approach
https://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/code-first-approach-in-entity-framework/
Drop all tables in SQL Server
https://stackoverflow.com/questions/8439650/how-to-drop-all-tables-in-a-sql-server-database
Drop all tables in SQL Server
DECLARE @Sql NVARCHAR(500);
DECLARE @Cursor CURSOR;
SET @Cursor = CURSOR FAST_FORWARD
FOR SELECT DISTINCT
sql = 'ALTER TABLE [' + tc2.TABLE_SCHEMA + '].[' + tc2.TABLE_NAME + '] DROP [' + rc1.CONSTRAINT_NAME + '];'
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS rc1
LEFT JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc2 ON tc2.CONSTRAINT_NAME = rc1.CONSTRAINT_NAME;
OPEN @Cursor;
FETCH NEXT FROM @Cursor INTO @Sql;
WHILE(@@FETCH_STATUS = 0)
BEGIN
EXEC sp_executesql
@Sql;
FETCH NEXT FROM @Cursor INTO @Sql;
END;
CLOSE @Cursor;
DEALLOCATE @Cursor;
GO
EXEC sp_MSforeachtable
'DROP TABLE ?';
GO