A company needs to create a new table called employees with the following fields: employee_id (unique number) name (text, up to 200 characters) salary (decimal with up to 2 decimal places) Which SQL statement is correct? CREATE TABLE employees (employee_id VARCHAR(200), name INT, salary DECIMAL(10,2)); CREATE TABLE employees (employee_id INT, name VARCHAR(200), salary DECIMAL(10,2)); CREATE TABLE employees (employee_id INT, name DECIMAL(10,2), salary VARCHAR(200)); CREATE employees TABLE (employee_id INT, name VARCHAR(200), salary DECIMAL(10,2)); Answer: CREATE TABLE employees (employee_id INT, name VARCHAR(200), salary DECIMAL(10,2)); Explanation: INT is appropriate for IDs, VARCHAR(200) stores names, and DECIMAL(10,2) supports monetary values with 2 decimal places. The other options either mismatch data types or have invalid syntax.
Blog
You’re knee-deep in grain deals and cow-trading negotiations…
You’re knee-deep in grain deals and cow-trading negotiations. You’re not a protector of the community in the traditional sense, but the community depends on your ability to make a killer trade route. You are a member of…
A bank keeps transaction data in transactions and account da…
A bank keeps transaction data in transactions and account data in accounts. They run: SELECT accounts.account_id, transactions.amount FROM accounts FULL OUTER JOIN transactions ON accounts.account_id = transactions.account_id; Which statement best describes the result? Only accounts that have transactions Only transactions linked to valid accounts All accounts and all transactions, matching where possible Accounts without balances are excluded Answer: All accounts and all transactions, matching where possible Explanation: A FULL OUTER JOIN includes everything from both sides, inserting NULLs where no match exists.
A university stores student information in a table called st…
A university stores student information in a table called students. The registrar wants to list students who are not from New York. Which query should be used? SELECT * FROM students WHERE city = ‘New York’ SELECT * FROM students WHERE NOT city = ‘New York’ SELECT * FROM students WHERE city ‘New York’ SELECT * FROM students WHERE city != ‘New York’ Answer: SELECT * FROM students WHERE NOT city = ‘New York’ Explanation: Using NOT before the condition excludes records that match New York. and != are valid alternatives in some SQL dialects, but NOT is the most universally clear and correct given the teaching context. Simply using = would only return New York, not exclude it.
Which of the following is a cholinergic response?
Which of the following is a cholinergic response?
A hospital has a patients table with columns city and patien…
A hospital has a patients table with columns city and patient_id. Administrators want to list cities with more than 100 patients. Which SQL should they use? SELECT city, COUNT(patient_id) FROM patients GROUP BY city HAVING COUNT(patient_id) > 100 SELECT city, COUNT(patient_id) FROM patients WHERE COUNT(patient_id) > 100 GROUP BY city SELECT city, patient_id FROM patients GROUP BY city HAVING patient_id > 100 SELECT city, COUNT(patient_id) FROM patients GROUP BY city WHERE COUNT(patient_id) > 100 Answer: SELECT city, COUNT(patient_id) FROM patients GROUP BY city HAVING COUNT(patient_id) > 100 Explanation: Aggregates like COUNT can only be filtered using HAVING. Using WHERE COUNT(…) is invalid. Filtering on patient_id > 100 incorrectly checks row-level values instead of group totals.
Students are allowed unlimited time to take this exam.
Students are allowed unlimited time to take this exam.
Which item is the predominant factor in protein stability?
Which item is the predominant factor in protein stability?
A newly isolated protein, is analyzed by SDS-polyacrylamide…
A newly isolated protein, is analyzed by SDS-polyacrylamide gel electrophoresis. After gel staining, the researcher obtains the figure below (DTT is dithiothreitol). Based on this gel, what could be the MW and structural arrangement of the native protein?
If you wanted to visualize the movement of individual microt…
If you wanted to visualize the movement of individual microtubules during the anaphase stage of mitosis, which microscopy technique would be the best choice?