Queries are basically the commands in order to select, define, and modify tables.
There are plenty of commands for them such as:
- Select
- Where, From
- As
- And
- Or
- Create
- Insert
- Between
- Order by
- Update
- Alter
- Distinct
- Join
- In
- Case
- Group by
- Views
- Dates
- Datepart
- Dateadd
- Delete
- Union
As you may or may not have noticed, the way commands are written in SQL is the same as how Relational Algebra works. There are commands to select, add, increase, decrease, subtract, etc, as the same as Relational Algebra.
Now as an example for how this works in SQL:
USE mydatabase; INSERT INTO orders (customer,day_of_order,product, quantity) VALUES('Tizag','8/1/08','Stapler',1);
USE mydatabase; SELECT * FROM orders WHERE customer = 'Tizag'
ORDER BY day_of_order;
...Of course these aren't really my examples, and since there is no way for me to actually modify this without somehow making it wrong, I copied this off from:
http://www.tizag.com/sqlTutorial/index.php
And that's probably all this blog will be for.
Maybe. If there's more than this I swear someone else is using this.