Sure, here are 100 SQL commands:
- SELECT - Retrieve data from a database.
- INSERT - Insert new data into a database.
- UPDATE - Update existing data in a database.
- DELETE - Delete data from a database.
- CREATE DATABASE - Create a new database.
- CREATE TABLE - Create a new table in a database.
- ALTER TABLE - Modify an existing table structure.
- DROP TABLE - Delete a table from a database.
- TRUNCATE TABLE - Remove all records from a table.
- CREATE INDEX - Create an index on a table.
- DROP INDEX - Remove an index from a table.
- JOIN - Combine rows from two or more tables based on a related column.
- INNER JOIN - Return rows when there is at least one match in both tables.
- LEFT JOIN - Return all rows from the left table, and the matched rows from the right table.
- RIGHT JOIN - Return all rows from the right table and the matched rows from the left table.
- FULL OUTER JOIN - Return all rows when there is a match in one of the tables.
- UNION - Combine the results of two or more SELECT statements.
- UNION ALL - Combine the results of two or more SELECT statements, including duplicates.
- GROUP BY - Group rows that have the same values into summary rows.
- HAVING - Filter records based on a group condition.
- ORDER BY - Sort the result set in ascending or descending order.
- DISTINCT - Return only distinct (different) values.
- COUNT - Count the number of records in a result set.
- SUM - Calculate the sum of a set of values.
- AVG - Calculate the average value of a set of values.
- MIN - Find the minimum value in a set of values.
- MAX - Find the maximum value in a set of values.
- BETWEEN - Select values within a range.
- LIKE - Select values matching a pattern.
- IN - Specify multiple values in a WHERE clause.
- NOT IN - Specify values not in a list.
- EXISTS - Test for the existence of rows in a subquery.
- NOT EXISTS - Test for the non-existence of rows in a subquery.
- CASE - Perform conditional logic in a query.
- WHEN - Define conditions in a CASE statement.
- THEN - Specify the result when a condition is true in a CASE statement.
- ELSE - Specify the result when no conditions are true in a CASE statement.
- END - End a CASE statement.
- CAST - Convert a value from one data type to another.
- CONVERT - Convert a value from one data type to another.
- IS NULL - Test for null values.
- IS NOT NULL - Test for non-null values.
- COALESCE - Return the first non-null value in a list.
- NULLIF - Return null if two expressions are equal, otherwise return the first expression.
- TOP - Select the top N records from a result set.
- LIMIT - Limit the number of rows returned in a result set.
- OFFSET - Skip a specified number of rows in a result set.
- FETCH - Retrieve a specific number of rows from a result set.
- ROW_NUMBER() - Assign a unique sequential integer to each row in a result set.
- RANK() - Assign a rank to each row in a result set.
- DENSE_RANK() - Assign a dense rank to each row in a result set.
- NTILE() - Divide a result set into a specified number of equally sized groups.
- ROWS - Specify a window frame for analytic functions.
- PARTITION BY - Divide the result set into partitions for analytic functions.
- OVER - Specify the window for analytic functions.
- FIRST_VALUE() - Return the first value in a sorted partition of a result set.
- LAST_VALUE() - Return the last value in a sorted partition of a result set.
- LEAD() - Access data from a subsequent row in a result set.
- LAG() - Access data from a preceding row in a result set.
- CROSS APPLY - Apply a table-valued function to each row returned by a query.
- OUTER APPLY - Apply a table-valued function to each row returned by a query, including rows with no match.
- PIVOT - Rotate rows into columns based on the values in a specified column.
- UNPIVOT - Rotate columns into rows based on the values in a specified column.
- INDEX HINT - Specify an index to be used by the query optimizer.
- TRANSACTION - Start a transaction.
- COMMIT - Save the changes made in a transaction.
- ROLLBACK - Undo the changes made in a transaction.
- SAVEPOINT - Set a point within a transaction to which you can later roll back.
- DECLARE - Declare a variable.
- SET - Assign a value to a variable.
- DECLARE CURSOR - Declare a cursor for iterative processing of a result set.
- OPEN - Open a cursor.
- FETCH - Retrieve the next row from a cursor.
- CLOSE - Close a cursor.
- DEALLOCATE - Deallocate the memory associated with a cursor.
- CREATE VIEW - Create a virtual table based on the result of a SELECT statement.
- DROP VIEW - Delete a view from a database.
- GRANT - Grant permissions to a user or role.
- REVOKE - Revoke permissions from a user or role.
- CREATE USER - Create a new database user.
- DROP USER - Delete a database user.
- CREATE ROLE - Create a new role in a database.
- DROP ROLE - Delete a role from a database.
- BEGIN - Start a transaction block.
- END - End a transaction block.
- IF - Execute a set of SQL statements conditionally.
- ELSE - Specify an alternative set of SQL statements to execute.
- WHILE - Execute a set of SQL statements repeatedly while a condition is true.
- BREAK - Exit from a WHILE loop.
- CONTINUE - Skip the remaining statements in a loop iteration and start the next iteration.
- GOTO - Jump to a specified label within a batch or stored procedure.
- EXECUTE - Execute a stored procedure or dynamic SQL statement.
- CREATE PROCEDURE - Create a stored procedure.
- ALTER PROCEDURE - Modify an existing stored procedure.
- DROP PROCEDURE - Delete a stored procedure.
- CREATE FUNCTION - Create a user-defined function.
- ALTER FUNCTION - Modify an existing user-defined function.
- DROP FUNCTION - Delete a user-defined function.
- CREATE TRIGGER - Create a trigger that automatically executes in response to certain events.
- DROP TRIGGER - Delete a trigger from a database.
These commands cover a wide range of functionalities and operations that can be performed in SQL.
0 Comments
CAN FEEDBACK
Emoji