Explore our extensive collection of questions and answers to enhance your learning experience and prepare for exams effectively
The AS keyword is used to create an alias for a table or column, which can make queries shorter and more readable, especially in joins.
GROUP BY is used with aggregate functions (e.g., COUNT, SUM) to group rows based on common values in one or more columns.
The ORDER BY clause is used for sorting. DESC is the keyword for descending order. The default is ascending (ASC).
The UPDATE statement is used to change the values in one or more columns of existing rows that match a specified condition.
COUNT() is an aggregate function that counts the number of rows. COUNT(*) counts all rows, while COUNT(column) counts non-NULL values in that column.
A PRIMARY KEY is a combination of a UNIQUE constraint and a NOT NULL constraint. It ensures every row has a unique identifier.
A LEFT JOIN (or LEFT OUTER JOIN) returns all rows from the left table (Table1), and the matched rows from the right table (Table2). If there is no match, the columns from the right table will have NULL values.
The SELECT statement is used to query data. The asterisk * is a wildcard that represents all columns in the table.
VARCHAR is used for variable-length character strings. INT is for integers, DECIMAL for fixed-point numbers, and BOOLEAN for true/false values. A name is a string of characters.
The INSERT INTO statement is used to add one or more new records to a table.