SQL COMMANDS FOR FUN……..
VL#8
TOPIC: FUNCTIONAL COMMANDS IN SQL 2008
NAME: Darius Murdock DATE: November 6, 2014
VL#8: SECURITY IN SQL AND ROLES IN SQL SERVER
1. How do you create Query in SQL? COMMAND OR GUI?
SQL:
COMMAND: SELECT ASTRICTS (*) FROM TableName
GUI: Right Click New Database
2. Define statement in SQL will give you output with records starting with T.
3. Define INNER JOIN AND WRITE DOWN One example:
4. What is EQI Join?
5. What is the structure or command used in Joining Tutor table with session based on tutorkey as primary and foreign key.
With Following fields:
Lastname
Studentkey
Firstname
sessionstatus
6. Give an example for WHERE Clause:
SELECT * FROM SALES WHERE TOTAL = PRICE*QUANTITY
7. Give an example for Aliasing. Like, Group By, Having, Count, Max. Datepart.
TutorLastname AS [LName]
8. List 10 commands you learned in SQL:
CREATE TABLE - creates a new database table
ALTER TABLE - alters a database table
DROP TABLE - deletes a database table
CREATE INDEX - creates an index (search key)
DROP INDEX - deletes an index
SELECT - get data from a database table
UPDATE - change data in a database table
DELETE - remove data from a database table
INSERT INTO - insert new data in a database table
GROUP BY
9. What command do you use to get total of students with age over 25?
SELECT COUNT (*) AS “TOTAL OVER 25”
10. The role of AND OR, and Between in SQL query and give an example for each one.
11. _______________Clause sets a conditional statement, and it can be used with any type of SQL query
12 .______________temporarily assigns a table column a new name
13.______________It is used to extract data from databases
14. ______________is the command used to insert new data (a new row) into a table by specifying a list of values to be inserted into each table column.
15. ____________links together two or more conditional statements for increased filtering when running SQL commands
16.