yash sharma

Student at AMITY University

Skilled in HTML, CSS, Digital marketing, HTML, CSS, Digital marketing, HTML, CSS, Digital marketing, HTML, CSS, Digital marketing, HTML, CSS, Digital marketing, HTML, CSS, Digital marketing, HTML, CSS, Digital marketing, HTML, CSS, Digital marketing, HTML, CSS, Digital marketing

Certified in Google Digital Unlocked

The SQL DROP DATABASE Statement

The SQL DROP DATABASE Statement The DROP DATABASE statement is used to drop an existing SQL database. Syntax DROP DATABASE databasename; Note: Be careful before dropping a database. Deleting a database will result in loss of complete information stored in the database!

The SQL HAVING Clause

The SQL HAVING Clause The HAVING clause was added to SQL because the WHERE keyword could not be used with aggregate functions. HAVING Syntax SELECT column_name(s) FROM table_name WHERE condition GROUP BY column_name(s) HAVING condition ORDER BY column_name(s);

The SQL IN Operator

The SQL IN Operator The IN operator allows you to specify multiple values in a WHERE clause. The IN operator is a shorthand for multiple OR conditions. IN Syntax SELECT column_name(s) FROM table_name WHERE column_name IN (value1, value2, ...); or: SELECT column_name(s) FROM table_name WHERE column_name IN (SELECT STATEMENT);

The SQL INSERT INTO Statement

The SQL INSERT INTO Statement The INSERT INTO statement is used to insert new records in a table. INSERT INTO Syntax It is possible to write the INSERT INTO statement in two ways. The first way specifies both the column names and the values to be inserted: INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...); If you are adding values for all the columns of the table, you do not need to specify the column names in the SQL query. However, make sure the order of the values is in the same order as the columns in the table. The INSERT INTO syntax would be as follows:

The SQL LIKE Operator

The SQL LIKE Operator The LIKE operator is used in a WHERE clause to search for a specified pattern in a column. There are two wildcards often used in conjunction with the LIKE operator: • % - The percent sign represents zero, one, or multiple characters • _ - The underscore represents a single character Note: MS Access uses an asterisk (*) instead of the percent sign (%), and a question mark (?) instead of the underscore (_). The percent sign and the underscore can also be used in combinations!

The SQL ORDER BY Keyword

The SQL ORDER BY Keyword The ORDER BY keyword is used to sort the result-set in ascending or descending order. The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword. ORDER BY Syntax SELECT column1, column2, ... FROM table_name ORDER BY column1, column2, ... ASC|DESC;

The SQL SELECT INTO Statement

The SQL SELECT INTO Statement The SELECT INTO statement copies data from one table into a new table. SELECT INTO Syntax Copy all columns into a new table: SELECT * INTO newtable [IN externaldb] FROM oldtable WHERE condition; Copy only some columns into a new table: SELECT column1, column2, column3, ... INTO newtable [IN externaldb] FROM oldtable WHERE condition; The new table will be created with the column-names and types as defined in the old table. You can create new column names using the AS clause. ________________________________________

The SQL SELECT TOP Clause

The SQL SELECT TOP Clause The SELECT TOP clause is used to specify the number of records to return. The SELECT TOP clause is useful on large tables with thousands of records. Returning a large number of records can impact performance. Note: Not all database systems support the SELECT TOP clause. MySQL supports the LIMIT clause to select a limited number of records, while Oracle uses ROWNUM. SQL Server / MS Access Syntax: SELECT TOP number|percent column_name(s) FROM table_name WHERE condition; MySQL Syntax: SELECT column_name(s) FROM table_name WHERE condition LIMIT number;

The SQL SELECT DISTINCT Statement

The SQL SELECT DISTINCT Statement The SELECT DISTINCT statement is used to return only distinct (different) values. Inside a table, a column often contains many duplicate values; and sometimes you only want to list the different (distinct) values. SELECT DISTINCT Syntax SELECT DISTINCT column1, column2, ... FROM table_name; SELECT Example Without DISTINCT The following SQL statement selects ALL (including the duplicates) values from the "Country" column in the "Customers" table: Example SELECT Country FROM Customers; Try it Yourself » Now, let us use the DISTINCT keyword with the above SELECT statement and see the result.

SQL RIGHT JOIN Keyword

SQL RIGHT JOIN Keyword The RIGHT JOIN keyword returns all records from the right table (table2), and the matched records from the left table (table1). The result is NULL from the left side, when there is no match. RIGHT JOIN Syntax SELECT column_name(s) FROM table1 RIGHT JOIN table2 ON table1.column_name = table2.column_name;

SQL PRIMARY KEY Constraint

SQL PRIMARY KEY Constraint The PRIMARY KEY constraint uniquely identifies each record in a table. Primary keys must contain UNIQUE values, and cannot contain NULL values. A table can have only ONE primary key; and in the table, this primary key can consist of single or multiple columns (fields).

SQL Wildcard Characters

SQL Wildcard Characters A wildcard character is used to substitute one or more characters in a string. Wildcard characters are used with the SQL LIKE operator. The LIKE operator is used in a WHERE clause to search for a specified pattern in a column