In software development, whether in a program or issued directly, a command is a directive given by the user to an application to perform a specific action. This could be through a line of code, typed into a terminal, or executed through another application for this purpose.
For SQL, commands are issued through SQL statements. As such, the distinction between a “SQL command” and a “SQL statement” from a technical perspective is little to none; though the former could be used to refer to just the statement type itself (SELECT) whereas statement specifically refers to a complete piece of code that can be executed.
Practically speaking for most, SQL statement is used to refer to a piece of code that returns or modifies data or tables, whereas SQL command more commonly refer to other types of statements more related to the management and operation of a database (e.g. adding or removing users or changing user permissions).
Learn SQL Today
Get hands-on experience writing code with interactive tutorials in our free online learning platform.
- Free and fun
- Designed for beginners
- No downloads or setup required