SQL

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

True or False: In SQL, the JOIN command allows you to change the data in a field in a database.

FALSE Feedback: In SQL, the JOIN command allows you to temporarily to join and simultaneously access the data in more than one table. UPDATE changes the data in a filed in a database.

True or False: SQL can be divided into two parts - the data manipulation language and data definition language. The query and update commands form the DML part of SQL and the DDL part of SQL permits database tables to be created or deleted.

TRUE

True or False: To specify the table you want to access, keywords such as FROM or INTO are used. The clause FROM Persons indicates the table you want to use from the database.

TRUE

True or False: When using the SQL JOIN statement using two tables, a larger table is created on the matching of the primary and foreign keys. To distinguish the data in each table SQL uses something called dot notation. An example of this would be using the tables STUDENT and ADVISOR, looking like STUDENT.AdvisorID = ADVISOR.AdvisorID

TRUE

True or False: SQL uses an action called WILDCARDS. The Wildcard is used to substitute characters in a query. A Wildcard symbol includes an asterisk (*).

TRUE (%OR*) SUBSTITUTE FOR 0 OR MORE CHARACTERISTICS (_OR?) SUB FOR ONE CHARACTER [CHARLIST] ANY SINGLE CHARACTER IN A CHARACTER LIST [^CHARLIST] or [!CHARLIST] ANY SINGLE CHARACTER NOT IN THE LIST

True or False: Most SQL queries can be divided into three elements that specify the action, the name of the table in the database, and a set of parameters.

TRUE Feedback: Most SQL queries can be divided into three elements that specify the action, the name of the table in the database, and a set of parameters.

True or False: SQL works between the client and the database.

TRUE Feedback: The database client software takes the data input from the user and converts into an SQL query to carry put your instructions. SQL commands interact directly with the database to locate data, update records, and perform other functions the user requests.

True or False: By using the NOT operator in an SQL search, you can eliminate records from the search by specifying a not-equal relationship.

True Feedback: By using the NOT operator in an SQL search, you can eliminate records from the search by specifying a not-equal relationship.

True or False: In a database yo want to find a set a of data between two values. To do this, the BETWEEN operator is used.

True Feedback: In a database yo want to find a set a of data between two values. To do this, the BETWEEN operator is used.

With SQL, how do you select a column named "FirstName" from a table called "Persons"?

SELECT FirstName FROM Persons

What does SQL stand for?

Structured Query Language

What is SQL?

Structured Query Language -Works between database software (the client) and the database -Software takes the input, then converts to query in the database

True or False: With SQL, you can delete the records where the "FirstName" is "Peter" in the Persons Table by doing the following: DELETE FROM Persons WHERE FirstName = 'Peter'

TRUE

True or False:With SQL, you insert a new record into the "Persons" table by using the following: INSERT INTO Persons VALUES ('Jimmy', 'Jackson')

TRUE

Which SQL statement is used to update data in the database?

UPDATE

What is DDL; what does it do?

DATA DEFINITION LANGUAGE the DDL part of SQL permits databse tables to be created or deleted it also defines the indexes (keys), specify links between tables and impose constraints between tables CREATE DATABASE ALTER DATABASE DROP TABLE CREATE INDEX DROP INDEX

What is DML; what does it do?

DATA MANIPULATION LANGUAGE the query and update commands form the DML part of SQL SELECT UPDATE DELETE INSERT INTO

Know the RELATIONAL operators

...

Less than (<)

...

Not equal to (!= or < >)

...

Order By

...

Where

...

between

...

delete

...

like

...

update

...

When you want to select a record where two or more conditions are met, you use the _____ operator.

AND Feedback: When you want to select a record where two or more conditions are met, you use the And operator. Sometimes the plus (+) sign is used.

SQL uses search operators such as And, Or, and Not to form complex queries. These operators are also referred to as ______ operators.

BOOLEAN Feedback: SQL uses search operators such as And, Or, and Not to form complex queries. These operators are also referred to as Boolean operators.

Which SQL statement is used to insert new data into the database?

INSERT INTO

For multiple conditions in a query, you use _____ operators to combine two or more conditions.

LOGICAL

When you create a query which selects a record where either one of the conditions is satisfied, you use the _____ operator.

OR

Which SQL keyword is used to order the result-set?

ORDER BY

and

displays a record if both the first condition and the 2nd condition is true

or

displays a record if either the first condition or the second condition is true

What is the purpose of an SQL Wildcard?

execute queries retrieve data insert, update, and delete records create new databases create new tables create views and store procedures set permissions

not

used to OMIT records from a search specify not equal relationship

Be able to describe the actions of the SQL keywords

...

Breakdown and identify the elements of a query.

...

Equal to (=)

...

Greater than (>)

...

Know the Boolean/LOGICAL operators -

...


Ensembles d'études connexes

Types of Financial Intermediaries

View Set

Week 1, week 2, If A and B are mutual exclusive events, the probability one of them occur, P(A or B) is

View Set

Honors English 1 Vocabulary (week 4)

View Set

Test #3 Pharmacology Flash Cards

View Set

Statistics 6.1: Normal Distribution

View Set

Quiz 2 Scientific method earth science grade 9 (LUOA)

View Set

Science Chapter 11A Section Review

View Set