The SQL “ NOT ” clause is used with “ WHERE ” conditions. The “ AND ”, “ OR ” and “ NOT ” operators are used to test two or more conditions in a SELECT , INSERT , UPDATE , or DELETE statements. The “ WHERE” clause with “ AND” operator requires that two conditions are true and an “ OR ” requires that one of two conditions is true and the “ NOT” negates the specified condition. Stayed Informed - 37 Best SQL Server Interview Questions and Answers Syntax:- --THE WHERE WITH AND OPERATOR SELECT ColumnName, ColumnName FROM TableName WHERE Condition1 AND Condition2 --THE WHERE WITH OR OPERATOR UPDATE TableName SET ColumnName = value WHERE Condition1 OR Condition2 --THE WHERE WITH NOT OPERATOR DELETE TableName WHERE NOT Condition1 Examples:- --SELECT ALL COUNTRIES SELECT [Id] ,[CountryName] ,[CountryCode] FROM [test].[dbo].[Countries] Result:- Id CountryName CountryCode ------------------------------...
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers