Web www.tizag.com

SQL - Commands

SQL commands can be categorized into three distinct groups. Each type of command plays an essential role while working with your database. One analogy might be to think of each SQL Command as a possible tool in your tool shed. Certain duties require specific tools and the more tools you have in your shed, the greater the chances that you will have the exact tool you need for the appropriate job.

SQL - What is a Clause

Clauses were mentioned briefly in the SQL Queries lesson. To briefly recap, they are the commands issued during a query. SELECT, INSERT, ADD, DROP, CREATE, etc are all clauses that begin each SQL Query and execute some sort of action upon your database.

SQL - What is a Function

There are a number of functions built into SQL that can add column values for you, average column values, or even change lowercase to uppercase strings. These functions are used directly inside of your queries and are excellent tools for you to use.

SQL Code:

Count() function

SELECT COUNT(*) FROM table_one;

The query above will return a numeric value representing the number of rows that have been inserted into your database. We will be covering this function as well as many others as this tutorial continues.

SQL - What is an Operator

Operators are a means by which SQL can manipulate numbers and strings or test for equality. They come in four flavors including: Arithmatic, Range, Equality, and Logical. As your skills with SQL grow, you may want the language to start performing some basic arithmatic for you or perhaps you wish to select a range of rows with a numeric column value larger than 5. This becomes possible with operators.

SQL Code:

SELECT * FROM table_one WHERE column_one > 5;




New - Tizag.com Forums!
Recent Forum Topics: