Month: April 2017 →
Page 5 of 8

SQL Create DataBase

SQL Create DataBase The CREATE DATABASE Statement is used to create a database in SQL. After creating a database, we can create some other database objects like  (tables, views, procedures etc.) into it. The user should have admin privileges for creating database.: SQL CREATE DATABASE Syntex: CREATE DATABASE database_name   CREATE DATABASE Example: If you […]

Continue Reading →
 

Difference between truncate and delete in sql

TRUNCATE When you TRUNCATE a table less information is logged.  This means the TRUNCATE statement executes very fast; however, it does so at the expense of not logging each row deleted. This means, that you need to be very careful when using the command (actually be careful with DELETE as well!). Truncate Syntax TRUNCATE TABLE UserMaster Truncate […]

Continue Reading →
 

Difference between firstordefault and singleordefault

Both are the element operators and they are used to select a single element from a sequence. But there is a minor difference between them. SingleOrDefault() operator would throw an exception if more than one elements are satisfied the condition where as FirstOrDefault() will not throw any exception for the same Single() – There is […]

Continue Reading →