The _______ statement is used to extract data from a database
SELECT
Logical operator used to compare a value greater than another value.
>
Application used to connect to SQL servers to query data
Microsoft SQL Server Management Studio.
What type of SQL join returns only the rows that have matching values in both tables involved?
INNER JOIN
%
The _________ statement is used to modify the existing records in a table
UPDATE
The _____ operator allows you to specify multiple values in a WHERE clause
IN
What is a primary key in a database table?
It is a unique identifier for each row in a table.
What type of SQL join returns all the rows from the left table and the matching rows from the right table, and fills in NULL values for non-matching rows?
LEFT JOIN
What is a Subquery?
A subquery is a query within another query, also known as a nested query or inner query.
DISTINCT
Table that contains column names for the database.
sys.syscolumns
What is a foreign key in a database table?
It is a column or set of columns that establishes a link between two tables.
What SQL keyword is used to combine multiple conditions in a join?
What is the result from this query
Declare @Date datetime
SET @Date = '2024-05-10 00:00:00.00'
SET @Date = DATEADD(DAY,10,@Date)
Select @Date - 1
Select one:
a) 2024-05-09 00:00:00.000
b) 2024-05-20 00:00:00.000
c) 2024-05-19 00:00:00.000
d) I don't know
c) 2024-05-19 00:00:00.000
This command is used to group rows based on one or more columns and perform aggregate functions on each group.
GROUP BY
IsNull function, describe it's use
IsNull is used to specify a value when the expression is null
tinyint, smallint, int, bigint
In a many-to-many relationship, what type of table is used to connect the two main tables?
Join table or Bridge table
When using the "group by" clause, what columns should you include.
All columns in the SELECT clause that do not contain an aggregate function
This command is used to combine the result sets of two or more SELECT statements into a single result set.
UNION
Main difference between Union and Union All
UNION only returns unique record, while UNION ALL returns all the records including duplicates.
What is the result
select SUBSTRING(lastname,1,3) from Person p
where lastname= 'Matthew'
Select one:
a ) Mat
b) hew
c) thew
d ) Phone a friend
a ) Mat
What is the purpose of using aliases in SQL JOINS?
SQL aliases are used to give a table, or a column in a table, a temporary name. Aliases are often used to make column names more readable.
Who is this man?
Pinal Dave