| TOP 200 SQL COMMANDS |
  1. SELECT: Retrieves data from one or more tables.

  2. INSERT: Adds new rows to a table.

  3. UPDATE: Modifies existing data in a table.

  4. DELETE: Removes rows from a table.

  5. CREATE TABLE: Defines a new table and its columns.

  6. ALTER TABLE: Modifies an existing table structure.

  7. DROP TABLE: Deletes a table and its data.

  8. CREATE INDEX: Creates an index on a table for faster query performance.

  9. DROP INDEX: Deletes an index.

  10. CREATE VIEW: Defines a virtual table based on a SELECT query.

  11. DROP VIEW: Deletes a view.

  12. GRANT: Provides specific privileges to users or roles.

  13. REVOKE: Removes specific privileges from users or roles.

  14. COMMIT: Saves all changes made during the current transaction.

  15. ROLLBACK: Undoes all changes made during the current transaction.

  16. SAVEPOINT: Sets a point within a transaction to which you can roll back.

  17. TRUNCATE: Removes all rows from a table, but keeps the table structure.

  18. CREATE DATABASE: Creates a new database.

  19. DROP DATABASE: Deletes a database and all its objects.

  20. USE: Selects a database to work with.

  21. EXEC: Executes a stored procedure or a SQL string.

  22. EXPLAIN: Provides information about how SQL statements are executed.

  23. DESCRIBE: Displays the structure of a table.

  24. SET: Changes the value of a variable or setting.

  25. CREATE PROCEDURE: Defines a new stored procedure.

  26. DROP PROCEDURE: Deletes a stored procedure.

  27. CREATE FUNCTION: Defines a new function.

  28. DROP FUNCTION: Deletes a function.

  29. CREATE TRIGGER: Defines a new trigger that executes in response to certain events.

  30. DROP TRIGGER: Deletes a trigger.

  31. CREATE SCHEMA: Defines a new schema.

  32. DROP SCHEMA: Deletes a schema.

  33. ALTER USER: Modifies a database user.

  34. CREATE USER: Defines a new database user.

  35. DROP USER: Deletes a database user.

  36. LOCK TABLE: Prevents other users from modifying a table.

  37. UNLOCK TABLE: Releases a previously acquired lock on a table.

  38. RENAME TABLE: Changes the name of a table.

  39. RENAME COLUMN: Changes the name of a column.

  40. COMMENT: Adds a comment to the data dictionary.

  41. CREATE SEQUENCE: Creates a sequence object for generating unique numbers.

  42. ALTER SEQUENCE: Modifies an existing sequence.

  43. DROP SEQUENCE: Deletes a sequence.

  44. ANALYZE: Collects statistics about a table or index to improve query performance.

  45. CHECKPOINT: Forces a write of all dirty buffers to disk.

  46. VACUUM: Reclaims storage occupied by dead tuples in PostgreSQL.

  47. CLUSTER: Reorganizes a table based on an index.

  48. WITH: Defines a common table expression (CTE) for temporary use within a query.

  49. REINDEX: Rebuilds an index.

  50. LISTEN: Listens for a notification in PostgreSQL.

  51. NOTIFY: Sends a notification in PostgreSQL.

  52. DISCARD: Resets session state (PostgreSQL).

  53. COPY: Copies data between a table and a file.

  54. SET TRANSACTION: Sets the characteristics of the current transaction.

  55. SHOW: Displays the current value of a configuration parameter.

  56. RESET: Resets the value of a configuration parameter to its default.

  57. COMMENT ON: Adds comments to database objects.

  58. ALTER INDEX: Modifies the structure of an existing index.

  59. ALTER VIEW: Modifies an existing view.

  60. ALTER SEQUENCE: Changes the properties of an existing sequence.

  61. ALTER DATABASE: Modifies an existing database.

  62. ALTER SCHEMA: Changes the definition of an existing schema.

  63. ALTER PROCEDURE: Modifies an existing stored procedure.

  64. ALTER FUNCTION: Changes the properties of an existing function.

  65. ALTER TRIGGER: Changes the definition of an existing trigger.

  66. ALTER EVENT: Modifies an existing event (in databases that support event scheduling, like MySQL).

  67. CREATE EVENT: Schedules an event for future execution (in databases that support event scheduling).

  68. DROP EVENT: Deletes a scheduled event.

  69. MERGE: Performs insert, update, or delete operations on a target table based on the results of a join with a source table.

  70. UPSERT: Inserts rows into a table, updating them if they already exist (syntax varies by database).

  71. DEALLOCATE: Releases a prepared statement.

  72. PREPARE: Creates a prepared statement for execution.

  73. EXECUTE: Executes a prepared statement.

  74. FETCH: Retrieves rows from a result set of a cursor.

  75. CURSOR: Declares a cursor for iteration over a result set.

  76. CLOSE: Closes a cursor.

  77. REVOKE: Removes previously granted privileges from a user or role.

  78. GRANT OPTION: Grants the ability to grant privileges to other users.

  79. START TRANSACTION: Begins a new transaction.

  80. SET ROLE: Changes the current role for the session.

  81. ALTER ROLE: Modifies an existing role.

  82. DROP ROLE: Deletes a role.

  83. CREATE ROLE: Defines a new role.

  84. DISABLE TRIGGER: Disables a trigger on a table.

  85. ENABLE TRIGGER: Enables a trigger on a table.

  86. DISABLE RULE: Disables a rule on a table (PostgreSQL).

  87. ENABLE RULE: Enables a rule on a table (PostgreSQL).

  88. DISABLE CONSTRAINT: Disables a constraint on a table.

  89. ENABLE CONSTRAINT: Enables a constraint on a table.

  90. VALIDATE CONSTRAINT: Validates a constraint on a table.

  91. ADD CONSTRAINT: Adds a new constraint to a table.

  92. DROP CONSTRAINT: Deletes a constraint from a table.

  93. CHECK: Adds a check constraint to a table.

  94. FOREIGN KEY: Defines a foreign key constraint on a table.

  95. PRIMARY KEY: Defines a primary key constraint on a table.

  96. UNIQUE: Defines a unique constraint on a table.

  97. EXCEPT: Returns distinct rows from the first query that aren't in the second query.

  98. INTERSECT: Returns distinct rows that are output by both queries.

  99. UNION: Combines the result sets of two queries and returns distinct rows.

  100. UNION ALL: Combines the result sets of two queries and returns all rows, including duplicates.

  101. CASCADE: Applies changes to dependent objects.

  102. RESTRICT: Prevents changes if there are dependent objects.

  103. CASE: Provides conditional logic within SQL statements.

  104. COALESCE: Returns the first non-null value in a list of arguments.

  105. NULLIF: Returns null if two expressions are equal.

  106. GREATEST: Returns the greatest value in a list of expressions.

  107. LEAST: Returns the least value in a list of expressions.

  108. SUBQUERY: Allows nested queries within a SQL statement.

  109. WINDOW FUNCTIONS: Performs calculations across a set of table rows related to the current row.

  110. OVER: Defines a window for window functions.

  111. PARTITION BY: Divides the result set into partitions for window functions.

  112. RANK: Assigns a rank to each row within a partition of a result set.

  113. DENSE_RANK: Similar to RANK but without gaps in ranking values.

  114. ROW_NUMBER: Assigns a unique sequential integer to rows within a partition.

  115. NTILE: Distributes rows into a specified number of approximately equal groups.

  116. LAG: Accesses data from a previous row in the same result set.

  117. LEAD: Accesses data from a subsequent row in the same result set.

  118. FIRST_VALUE: Returns the first value in an ordered set of values.

  119. LAST_VALUE: Returns the last value in an ordered set of values.

  120. CUME_DIST: Calculates the cumulative distribution of a value in a set of values.

  121. PERCENT_RANK: Calculates the relative rank of a row within a group.

  122. GROUPING SETS: Allows multiple groupings in a single query.

  123. ROLLUP: Generates subtotals and grand totals in a query.

  124. CUBE: Generates subtotals for all combinations of groupings in a query.

  125. PIVOT: Rotates rows into columns (specific to some databases like SQL Server).

  126. UNPIVOT: Rotates columns into rows (specific to some databases like SQL Server).

  127. JSON Functions: Allows querying and manipulation of JSON data (specific to some databases).

  128. XML Functions: Allows querying and manipulation of XML data (specific to some databases).

  129. ARRAY Functions: Allows querying and manipulation of array data (specific to some databases).

  130. HSTORE: A key-value store within a single PostgreSQL table column.

  131. FULLTEXT SEARCH: Provides full-text search capabilities (specific to some databases).

  132. MATERIALIZED VIEW: Stores the result of a query physically and can be refreshed.

  133. REFRESH MATERIALIZED VIEW: Updates the data in a materialized view.

  134. CONNECT BY: Used for hierarchical queries in Oracle.

  135. START WITH: Specifies the root of a hierarchical query in Oracle.

  136. NOCYCLE: Prevents infinite loops in hierarchical queries in Oracle.

  137. SYNONYM: Creates an alias for a database object (specific to some databases).

  138. PACKAGE: Groups related procedures, functions, variables, and other package contents (specific to Oracle).

  139. AUTHID: Specifies whether a PL/SQL package or subprogram executes with the privileges of its definer or invoker (specific to Oracle).

  140. PRAGMA: Provides additional instructions to the compiler (specific to Oracle).

  141. PIPELINED: Allows a table function to return rows iteratively (specific to Oracle).

  142. CROSS APPLY: Applies a table-valued function to each row (specific to SQL Server).

  143. OUTER APPLY: Similar to CROSS APPLY but includes rows with no matches (specific to SQL Server).

  144. SAMPLE: Retrieves a random sample of data from a table.

  145. FOR UPDATE: Locks selected rows so they cannot be updated by other transactions.

  146. FETCH FIRST: Limits the number of rows returned by a query.

  147. SKIP LOCKED: Skips locked rows in the result set (specific to some databases).

  148. FOR XML: Formats query results as XML (specific to SQL Server).

  149. FOR JSON: Formats query results as JSON (specific to SQL Server).

  150. ALTER MATERIALIZED VIEW: Changes the structure or properties of a materialized view.

  151. DROP MATERIALIZED VIEW: Deletes a materialized view.

  152. ALTER SYSTEM: Modifies system-level settings (specific to Oracle and some other RDBMS).

  153. ALTER SESSION: Changes session-level settings (specific to Oracle and some other RDBMS).

  154. DBMS_SCHEDULER: Schedules and manages jobs (specific to Oracle).

  155. DBMS_STATS: Gathers optimizer statistics (specific to Oracle).

  156. PRAGMA AUTONOMOUS_TRANSACTION: Allows a transaction to be independent of the main transaction (specific to Oracle).

  157. EXECUTE IMMEDIATE: Executes a dynamic SQL statement (specific to Oracle).

  158. CTAS (CREATE TABLE AS SELECT): Creates a new table based on the result of a SELECT query.

  159. ALTER TYPE: Modifies an existing user-defined type (specific to some databases).

  160. CREATE TYPE: Defines a new user-defined data type (specific to some databases).

  161. DROP TYPE: Deletes a user-defined data type.

  162. ALTER OPERATOR: Modifies an existing operator (specific to some databases).

  163. CREATE OPERATOR: Defines a new operator (specific to some databases).

  164. DROP OPERATOR: Deletes an operator.

  165. CREATE AGGREGATE: Defines a new aggregate function (specific to PostgreSQL).

  166. DROP AGGREGATE: Deletes an aggregate function.

  167. ALTER FUNCTION: Modifies the definition of an existing function.

  168. ALTER PROCEDURE: Modifies the definition of an existing stored procedure.

  169. ALTER TRIGGER: Modifies the definition of an existing trigger.

  170. ALTER VIEW: Changes the definition of an existing view.

  171. SET CONSTRAINT: Sets the mode of a constraint (deferred or immediate).

  172. SET TRANSACTION ISOLATION LEVEL: Sets the isolation level for the current transaction.

  173. LOCK TABLE: Locks a table for a specific transaction.

  174. ALTER TABLESPACE: Modifies the properties of a tablespace (specific to Oracle).

  175. DROP TABLESPACE: Deletes a tablespace and all its contents (specific to Oracle).

  176. CREATE TABLESPACE: Defines a new tablespace (specific to Oracle).

  177. ALTER INDEX REBUILD: Rebuilds an existing index (specific to some databases).

  178. VACUUM ANALYZE: Reclaims storage and updates statistics in PostgreSQL.

  179. LISTEN/NOTIFY: Implements a publish/subscribe model for inter-process communication (specific to PostgreSQL).

  180. DISABLE/ENABLE RULE: Disables or enables a rewrite rule on a table (specific to PostgreSQL).

  181. DISABLE/ENABLE CONSTRAINT: Disables or enables a constraint.

  182. DROP RULE: Deletes a rewrite rule (specific to PostgreSQL).

  183. ALTER RULE: Modifies an existing rewrite rule (specific to PostgreSQL).

  184. CREATE RULE: Defines a new rewrite rule (specific to PostgreSQL).

  185. ALTER SYSTEM SET: Changes a system parameter (specific to Oracle).

  186. ALTER DATABASE LINK: Modifies a database link (specific to Oracle).

  187. CREATE DATABASE LINK: Defines a new database link (specific to Oracle).

  188. DROP DATABASE LINK: Deletes a database link (specific to Oracle).

  189. ALTER MATERIALIZED VIEW LOG: Changes a materialized view log.

  190. CREATE MATERIALIZED VIEW LOG: Defines a log to capture changes for a materialized view.

  191. DROP MATERIALIZED VIEW LOG: Deletes a materialized view log.

  192. GRANT CONNECT THROUGH: Grants the ability to connect through a specific user (specific to Oracle).

  193. ALTER DATABASE BEGIN BACKUP: Puts a database into backup mode (specific to Oracle).

  194. ALTER DATABASE END BACKUP: Ends backup mode for a database (specific to Oracle).

  195. ALTER DATABASE RENAME FILE: Renames a database file (specific to Oracle).

  196. ALTER DATABASE MOUNT: Mounts a database (specific to Oracle).

  197. ALTER DATABASE OPEN: Opens a mounted database (specific to Oracle).

  198. ALTER DATABASE RECOVER: Recovers a database (specific to Oracle).

  199. FLASHBACK TABLE: Restores a table to a previous state (specific to Oracle).

  200. FLASHBACK DATABASE: Restores the entire database to a previous state (specific to Oracle).

Comments (1)