Prelim Flashcards

1
Q

It is the standard language for dealing with Relational Databases.

A

SQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

______ is used to insert, search, update, and
delete database records.

A

SQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

TRUE OR FALSE:
SQL keyword are NOT case sensitive select is the same as SELECT

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

TRUE OR FALSE:
Some database systems require a semicolon at the end of each SQL statement.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

_________ is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server.

A

Semicolon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

SQL COMMAND:
Extracts data from a database

A

SELECT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

SQL COMMAND:
Updates data in a database

A

UPDATE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

SQL COMMAND:
Deletes data from a database

A

DELETE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

SQL COMMAND:
Inserts new data into a database.

A

INSERT INTO

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

SQL COMMAND:
Creates a new database.

A

CREATE DATABASE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

SQL COMMAND:
Modifies a database.

A

ALTER DATABASE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

SQL COMMAND:
Creates a new table.

A

CREATE TABLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

SQL COMMAND:
Modifies a table.

A

ALTER TABLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

SQL COMMAND:
Deletes a table.

A

DROP TABLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

SQL COMMAND:
Creates an index (search key).

A

CREATE INDEX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

SQL COMMAND:
Deletes an index.

A

DROP INDEX

17
Q

What is the syntax of SELECT statement?

A

SELECT * FROM table name;

If only specific fields:
SELECT Lname, Fname, MI FROM Students (tablename);

18
Q

The __________ statement is used to return only distinct (different) values.

A

SELECT DISTINCT

19
Q

Syntax for SELECT Example Without DISTINCT

A

SELECT age FROM student;

20
Q

Syntax for SELECT Example With DISTINCT

A

SELECT DISTINCT age FROM student;

21
Q

Syntax for SELECT Example With COUNT DISTINCT

A

SELECT COUNT(DISTINCT age) FROM student;

22
Q

The WHERE clause is used to ____ records.

A

filter

23
Q

TRUE OR FALSE:
The WHERE clause is not only used in SELECT statements, it is also used in UPDATE, DELETE, etc.!

A

TRUE

24
Q

What is the syntax of WHERE clause?

A

SELECT * FROM students
WHERE age = ‘20’;

SELECT * FROM student
WHERE userID = 1;

25
Q

SQL requires ______ quotes around text values (most database systems will also allow double quotes).

A

single

26
Q

TRUE OR FALSE:
In SELECT clause, numeric fields should not be enclosed in quotes.

A

TRUE

27
Q

=

A

Equal

28
Q

>

A

Greater than

29
Q

<

A

Less than

30
Q

Operator:
Between a certain range

A

BETWEEN

31
Q

Operator:
Search for a pattern.

A

LIKE

32
Q

Operator:
To specify multiple possible values for a column.

A

IN

33
Q

Syntax for creating database

A

CREATE DATABASE

CREATE DATABASE student;

34
Q

Syntax for dropping database

A

DROP DATABASE student;

35
Q

Syntax for creating table

A

CREATE TABLE studinfo

36
Q

Syntax for dropping table

A

DROP TABLE studinfo

37
Q

Syntax for adding a column

A

ALTER TABLE studinfo
ADD Remarks varchar(100);

38
Q

Syntax for deleting a column

A

ALTER TABLE studinfo
DROP COLUMN Remarks;

39
Q

AUTO_INCREMENT PRIMARY KEY,

FOREIGN KEY (SanIcoconnect) REFERENCE tablename(SanIcoconnect)

A