Deck 3: An Introduction to SQL

ملء الشاشة (f)
exit full mode
سؤال
In MySQL, you can display the data vertically rather than horizontally.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
When adding rows to character columns, make sure you enclose the values in double quotation marks.
سؤال
In SQL, you use the NOT NULL clause in a CREATE TABLE command to indicate columns that cannot contain null values.
سؤال
To create a table, type the word TABLE followed by the name of the table to be created and then by the names and data types of the columns that will comprise the table.
سؤال
To run the command(s)in a script file in MySQL, type SOURCE followed by the filename.
سؤال
To edit an SQL command, type EDIT at the mysql prompt..
سؤال
The shortcut command to quit MySQL is \q.
سؤال
If you added a row that should not be in a table, use a REMOVE command to remove it.
سؤال
To enter a null value into a table, you use a special format of the NULL command.
سؤال
Table names cannot contain spaces.
سؤال
This text uses MySQL version 5.0.
سؤال
The MySQL Reference Manual provides more detailed help.
سؤال
MySQL uses the term current database to refer to the database to which all subsequent commands pertain.
سؤال
MySQL does not require a password.
سؤال
SQL was developed as the data manipulation language for IBM's prototype relational model DBMS, System R.
سؤال
In SQL, there are special rules that specify that a particular word must begin in a particular position on the line.
سؤال
Dropping a table also deletes any data that you entered into the table.
سؤال
When you enter a new row into a table or modify an existing row, the values for one or more columns can be unknown or unavailable.
سؤال
In MySQL, you type the command at the mysql> prompt and press the Run key at the end of each line.
سؤال
In general, SQL is case-sensitive.
سؤال
SQL was developed in the mid-____.

A)1960s
B)1970s
C)1980s
D)1990s
سؤال
In MySQL, table names cannot exceed ____ characters.

A)12
B)14
C)16
D)18
سؤال
You indicate the end of a command by typing a(n)____.

A)column
B)comma
C)semicolon
D)period
سؤال
Script files must be saved in the default folder for the DBMS.
سؤال
To list all the columns in a table, use the LIST COLUMNS command.
سؤال
The USE command is executed at the start of every session to activate the database.
سؤال
The CREATE DATABASE command is executed only once for a database.
سؤال
The data type DECIMAL(5,2)represents a number with three places to the left and two places to the right of the decimal.
سؤال
If the CREATE TABLE command is executed more than once for the same table, MySQL overwrites the table with the newest data description.
سؤال
In MySQL, to delete the previous character, you need to press the ____ key(s).

A)Ctrl + A
B)Ctrl + E
C)Backspace
D)Delete
سؤال
To display all the rows and columns in a table, type the word SELECT, followed by a(n)____, followed by the word FROM and then the name of the table containing the data you want to view.

A)single quote
B)asterisk
C)double quote
D)slash
سؤال
In MySQL, you type commands at the mysql> ____.

A)worksheet
B)window
C)prompt
D)screen
سؤال
Which of the following commands changes the value in a column?

A)UPDATE
B)CHANGE
C)REPLACE
D)ADD
سؤال
The data type indicates the type of data that a column can contain as well as the maximum number of characters or digits that the column can store.
سؤال
In MySQL,the date, November 12, 2007 would be stored as '11-12-2007'.
سؤال
What is the original name of SQL?

A)SEQUEL
B)MYSEQUEL
C)DBase
D)MySQL
سؤال
Which of the following is a valid name for a table?

A)TBL_1
B)2_TBL
C)TBL 3
D)4 tbl
سؤال
In MySQL, to move to the beginning of the current line, you need to press the ____ key(s).

A)CTRL + A
B)Left arrow
C)Backspace
D)CTRL + E
سؤال
In MySQL, the data type STRING(n)stores a character string n characters long.
سؤال
BRANCH&BOOK is a valid name for a table in MySQL.
سؤال
The ____ command defines a table's structure by listing its columns, data types, and column lengths.

A)NEW TABLE
B)DEFINE TABLE
C)CREATE TABLE
D)ADD TABLE
سؤال
You use the ____________________ command to describe the layout of a table.
سؤال
____ is an example of a text editor.

A)NotePad
B)Paint
C)Microsoft Word
D)Outlook
سؤال
In MySQL, dates have the form ____.

A)DD-MM-YY
B)MM-DD-YY
C)YYYY-MM-DD
D)DD-MM-YYYY
سؤال
You can delete the entire table using the ____________________ TABLE command.
سؤال
In MySQL, you use the ____________________ command to change the database to the one you want to use.
سؤال
The ____ data type is used to store integers.

A)INTEGER
B)NUMERAL
C)NUMBER
D)INT
سؤال
For any column whose data type is CHAR, values must be enclosed in ____.

A)double quotation marks
B)parentheses
C)single quotation marks
D)square brackets
سؤال
The simplest way to obtain help in MySQL is to type ____ at the mysql> prompt.

A)helpmysql
B)\h
C)\ms
D)\a
سؤال
The ____ data type stores only the actual character string.

A)CHAR
B)VARCHAR
C)TEXT
D)STRING
سؤال
The correct data type for the BALANCE column in the CUSTOMER table is ____.

A)CHAR
B)INT
C)SMALLINT
D)DECIMAL
سؤال
When a script file contains more than one command, each command must end with a ____.

A)question mark
B)colon
C)period
D)semicolon
سؤال
SQL is Structured ____________________ Language.
سؤال
In MySQL, to move to the end of a line, you need to press the ____ key(s).

A)CTRL + A
B)Right arrow
C)CTRL + E
D)Tab
سؤال
To display data vertically rather than horizontally, replace the semicolon at the end of the command with ____.

A)\G
B)\V
C)%
D)#
سؤال
You can use a special value to represent situations in which an actual value is unknown, unavailable, or not applicable. This special value is called a(n)____________________ data value.
سؤال
The ____ command activates the default database.

A)ACTIVATE
B)USE
C)DEFAULT
D)CHANGE
سؤال
The ____________________ command adds rows to a table.
سؤال
In MySQL, the most recent command entered is stored in a special area of memory called the ____.

A)browser history
B)command history
C)session history
D)statement history
سؤال
The mysql prompt displays in the ____ Client window.

A)MySQL
B)DOS
C)Server
D)Command Line
سؤال
How can you correct errors in data?
سؤال
To view the data in a table, you use the ____________________ command.
سؤال
You can use the ____________________ command to update a value in a table.
سؤال
If the word ____________________ follows the word INT, a column is created for which MySQL will automatically generate a new sequence number each time a new row is added.
سؤال
What are the common restrictions placed on table and column names?
سؤال
To create a new database, execute the ____________________ command.
سؤال
To examine the structure of a table, use the ____________________ command.
سؤال
Should a user be allowed to enter null values for the primary key?
سؤال
Script files must have a ____________________ file name extension.
سؤال
To get more information about the union command, type ____________________ at the command prompt.
سؤال
To indicate columns that cannot contain null values, use the ____________________ clause in a CREATE TABLE statement.
سؤال
A file containing SQL commands is called a ____________________ file.
سؤال
To run a script file, type either SOURCE or ____________________ followed by the name of the file.
سؤال
To move up a line in the statement history, use the ____________________ key(s).
سؤال
If you need to delete a record, you can use the ____________________ command.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/75
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 3: An Introduction to SQL
1
In MySQL, you can display the data vertically rather than horizontally.
True
2
When adding rows to character columns, make sure you enclose the values in double quotation marks.
False
3
In SQL, you use the NOT NULL clause in a CREATE TABLE command to indicate columns that cannot contain null values.
True
4
To create a table, type the word TABLE followed by the name of the table to be created and then by the names and data types of the columns that will comprise the table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
5
To run the command(s)in a script file in MySQL, type SOURCE followed by the filename.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
6
To edit an SQL command, type EDIT at the mysql prompt..
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
7
The shortcut command to quit MySQL is \q.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
8
If you added a row that should not be in a table, use a REMOVE command to remove it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
9
To enter a null value into a table, you use a special format of the NULL command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
10
Table names cannot contain spaces.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
11
This text uses MySQL version 5.0.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
12
The MySQL Reference Manual provides more detailed help.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
13
MySQL uses the term current database to refer to the database to which all subsequent commands pertain.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
14
MySQL does not require a password.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
15
SQL was developed as the data manipulation language for IBM's prototype relational model DBMS, System R.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
16
In SQL, there are special rules that specify that a particular word must begin in a particular position on the line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
17
Dropping a table also deletes any data that you entered into the table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
18
When you enter a new row into a table or modify an existing row, the values for one or more columns can be unknown or unavailable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
19
In MySQL, you type the command at the mysql> prompt and press the Run key at the end of each line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
20
In general, SQL is case-sensitive.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
21
SQL was developed in the mid-____.

A)1960s
B)1970s
C)1980s
D)1990s
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
22
In MySQL, table names cannot exceed ____ characters.

A)12
B)14
C)16
D)18
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
23
You indicate the end of a command by typing a(n)____.

A)column
B)comma
C)semicolon
D)period
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
24
Script files must be saved in the default folder for the DBMS.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
25
To list all the columns in a table, use the LIST COLUMNS command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
26
The USE command is executed at the start of every session to activate the database.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
27
The CREATE DATABASE command is executed only once for a database.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
28
The data type DECIMAL(5,2)represents a number with three places to the left and two places to the right of the decimal.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
29
If the CREATE TABLE command is executed more than once for the same table, MySQL overwrites the table with the newest data description.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
30
In MySQL, to delete the previous character, you need to press the ____ key(s).

A)Ctrl + A
B)Ctrl + E
C)Backspace
D)Delete
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
31
To display all the rows and columns in a table, type the word SELECT, followed by a(n)____, followed by the word FROM and then the name of the table containing the data you want to view.

A)single quote
B)asterisk
C)double quote
D)slash
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
32
In MySQL, you type commands at the mysql> ____.

A)worksheet
B)window
C)prompt
D)screen
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
33
Which of the following commands changes the value in a column?

A)UPDATE
B)CHANGE
C)REPLACE
D)ADD
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
34
The data type indicates the type of data that a column can contain as well as the maximum number of characters or digits that the column can store.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
35
In MySQL,the date, November 12, 2007 would be stored as '11-12-2007'.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
36
What is the original name of SQL?

A)SEQUEL
B)MYSEQUEL
C)DBase
D)MySQL
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
37
Which of the following is a valid name for a table?

A)TBL_1
B)2_TBL
C)TBL 3
D)4 tbl
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
38
In MySQL, to move to the beginning of the current line, you need to press the ____ key(s).

A)CTRL + A
B)Left arrow
C)Backspace
D)CTRL + E
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
39
In MySQL, the data type STRING(n)stores a character string n characters long.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
40
BRANCH&BOOK is a valid name for a table in MySQL.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
41
The ____ command defines a table's structure by listing its columns, data types, and column lengths.

A)NEW TABLE
B)DEFINE TABLE
C)CREATE TABLE
D)ADD TABLE
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
42
You use the ____________________ command to describe the layout of a table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
43
____ is an example of a text editor.

A)NotePad
B)Paint
C)Microsoft Word
D)Outlook
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
44
In MySQL, dates have the form ____.

A)DD-MM-YY
B)MM-DD-YY
C)YYYY-MM-DD
D)DD-MM-YYYY
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
45
You can delete the entire table using the ____________________ TABLE command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
46
In MySQL, you use the ____________________ command to change the database to the one you want to use.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
47
The ____ data type is used to store integers.

A)INTEGER
B)NUMERAL
C)NUMBER
D)INT
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
48
For any column whose data type is CHAR, values must be enclosed in ____.

A)double quotation marks
B)parentheses
C)single quotation marks
D)square brackets
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
49
The simplest way to obtain help in MySQL is to type ____ at the mysql> prompt.

A)helpmysql
B)\h
C)\ms
D)\a
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
50
The ____ data type stores only the actual character string.

A)CHAR
B)VARCHAR
C)TEXT
D)STRING
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
51
The correct data type for the BALANCE column in the CUSTOMER table is ____.

A)CHAR
B)INT
C)SMALLINT
D)DECIMAL
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
52
When a script file contains more than one command, each command must end with a ____.

A)question mark
B)colon
C)period
D)semicolon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
53
SQL is Structured ____________________ Language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
54
In MySQL, to move to the end of a line, you need to press the ____ key(s).

A)CTRL + A
B)Right arrow
C)CTRL + E
D)Tab
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
55
To display data vertically rather than horizontally, replace the semicolon at the end of the command with ____.

A)\G
B)\V
C)%
D)#
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
56
You can use a special value to represent situations in which an actual value is unknown, unavailable, or not applicable. This special value is called a(n)____________________ data value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
57
The ____ command activates the default database.

A)ACTIVATE
B)USE
C)DEFAULT
D)CHANGE
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
58
The ____________________ command adds rows to a table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
59
In MySQL, the most recent command entered is stored in a special area of memory called the ____.

A)browser history
B)command history
C)session history
D)statement history
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
60
The mysql prompt displays in the ____ Client window.

A)MySQL
B)DOS
C)Server
D)Command Line
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
61
How can you correct errors in data?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
62
To view the data in a table, you use the ____________________ command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
63
You can use the ____________________ command to update a value in a table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
64
If the word ____________________ follows the word INT, a column is created for which MySQL will automatically generate a new sequence number each time a new row is added.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
65
What are the common restrictions placed on table and column names?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
66
To create a new database, execute the ____________________ command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
67
To examine the structure of a table, use the ____________________ command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
68
Should a user be allowed to enter null values for the primary key?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
69
Script files must have a ____________________ file name extension.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
70
To get more information about the union command, type ____________________ at the command prompt.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
71
To indicate columns that cannot contain null values, use the ____________________ clause in a CREATE TABLE statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
72
A file containing SQL commands is called a ____________________ file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
73
To run a script file, type either SOURCE or ____________________ followed by the name of the file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
74
To move up a line in the statement history, use the ____________________ key(s).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
75
If you need to delete a record, you can use the ____________________ command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.