Back to marketplace

SQL

No description yet. This curated deck is ready for daily study.

Total cards: 19•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (19)

#1
Front (Question)

What does sql stand for?

Back (Answer)

Structured Query Language

#2
Front (Question)

What are the advantages of using SQL?

Back (Answer)

It’s easy to learn and use (as it’s a declarative language)

#3
Front (Question)

What are the 5 main SQL commands and what are the used for?

Back (Answer)

CREATE - used for creating tables SELECT - used for retrieving data from a table UPDATE - used for changing an attribute in an existing record INSERT - used for DELETE - used for removing records from a table

#4
Front (Question)

What is the format for a SELECT command?

Back (Answer)

SELECT attributes FROM table WHERE condition ORDER BY asc/desc

#5
Front (Question)

What is the format for a UPDATE command?

Back (Answer)

UPDATE table (attributes) SET new values WHERE = condition

#6
Front (Question)

What is the format for a DELETE command?

Back (Answer)

DELETE attributes FROM table WHERE condition

#7
Front (Question)

What is the format for a INSERT command that inserts values into all columns?

Back (Answer)

INSERT INTO table VALUES (value1, value2, …)

#8
Front (Question)

What is the format for a INSERT command that inserts values into specific columns?

Back (Answer)

INSERT INTO tablename (column1, column2) VALUES (value1, value2, …)

#9
Front (Question)

What does SELECT * FROM …. mean and what is the special name for it?

Back (Answer)

• It means select all the attributes from the database that apply to the condition. • The asterix (select all) is called a wildcard

#10
Front (Question)

What is the format for a CREATE command that inserts values into specific columns?

Back (Answer)

CREATE TABLE ( VARCHAR(225), VARCHAR(255), YEAR, PRIMARY KEY ( , ))

#11
Front (Question)

How is a fixed length string data type represented?

Back (Answer)

CHAR(size) - A string with the number of characters specified by size

#12
Front (Question)

How is a variable length string data type represented?

Back (Answer)

VARCHAR(size) - A string with any number of characters up to the number specified by size

#13
Front (Question)

How is a Integer data type represented?

Back (Answer)

INT(size) - Stores a whole number using the number of bits specified by size

#14
Front (Question)

How is a Number with fractional part data type represented?

Back (Answer)

FLOAT(size, precision) - A number stored using the number of bits specified by size with digits after the decimal point up to the number specified by precision

#15
Front (Question)

How is a Date data type represented?

Back (Answer)

DATE - A date in the format YYYY-MM-DD

#16
Front (Question)

How is a Date and time data type represented?

Back (Answer)

DATETIME - A date and time combined in the format YYYY-MM-DD HH:MM:SS

#17
Front (Question)

How is a Time data type represented?

Back (Answer)

TIME - A time in the format HH:MM:SS

#18
Front (Question)

How is a Year data type represented?

Back (Answer)

YEAR - A year in one of the two formats YY or YYYY

#19
Front (Question)

What is the format for an ALTER command?

Back (Answer)

To add a column: ALTER TABLE Employee ADD Department VARCHAR(10) To delete a column: ALTER TABLE Employee DROP COLUMN HireDate To change a column data type: ALTER TABLE Employee MODIFY COLUMN EmpName VARCHAR(30) NOT NULL