Tag sql keywords and functions

SQL CREATE Keyword

CREATE DATABASE The CREATE DATABASE command is used is to create a new SQL database. The following SQL creates a database called “testDB”: Example CREATE DATABASE testDB; Tip: Make sure you have admin privilege before creating any database. Once a…

SQL ANY Keyword

ANY The ANY command returns true if any of the subquery values meet the condition. The following SQL statement returns TRUE and lists the productnames if it finds ANY records in the OrderDetails table where quantity = 10:

SQL AND Keyword

AND The AND command is used with WHERE to only include rows where both conditions is true. The following SQL statement selects all fields from “Customers” where country is “Germany” AND city is “Berlin”:

SQL ALL Keyword

ALL The ALL command returns true if all of the subquery values meet the condition. The following SQL statement returns TRUE and lists the productnames if ALL the records in the OrderDetails table has quantity = 10: