3/16/22, 1:07 PM Science Computer Science SQL Essential Training Flashcards | Quizlet Databases SQL Essential Training Terms in this set (31) What is the purpose of a Foreign keys refer to the primary key in another foreign key? table to link the two tables together. Which clauses allow you to get SELECT; The select statement retrieves data from rows and columns from a table the database by easily selecting the rows and in the database? columns from a table. You must execute the select statement after the Which statement is true about inserting data to a table? insert into statement to see the result with the added row; You must execute the select statement after you execute the insert into statement to see the new result. What is the best way to return SELECT COUNT (*) FROM student; This code the number of rows in the correctly provides the number of rows in a table. student table? Which statement is true about selecting columns in SQL? Column names must be separated by commas. Syntax error if column names are not separated by commas. Which code returns the SELECT midtermexam, finalexam, gpa FROM Grade; columns midtermexam, This code correctly returns the columns finalexam, and gpa from the midtermexam, finalexam, and gpa from the grade grade table? table. Which SQL statement allows SELECT;The SELECT statement is used to retrieve you to retrieve data from a SQL data from a SQL database. database? What is the purpose of a foreign key? https://quizlet.com/621135511/sql-essential-training-flash-cards/ Foreign keys refer to the primary key in another table to link the two tables together;Foreign keys define the relationship between two tables. 1/4 3/16/22, 1:07 PM SQL Essential Training Flashcards | Quizlet Which code returns the first 10 SELECT * FROM Grade WHERE GPA=4.0 ORDER BY students who have a 4.0 GPA Name LIMIT 10; This code correctly selects the first from the Grade table ordered 10 students who have 4.0 GPAs from the Grade alphabetically? table ordered alphabetically. Remove existing rows from a table with the DELETE Which statement is true about FROM statement. The DELETE FROM statement removing rows from a table? removes rows from a table and once a row has been deleted it cannot be recovered. What is the correct code to DELETE FROM student WHERE id=3; This code remove row 3 from the student successfully removes row 3 from the student table. table? Which code is the correct way UPDATE student SET GPA=3.5 WHERE id=7; This to update the GPA for the code correctly updates the student information in student in row 7 from the row 7. student table? The SELECT statement is used all queries for _____. Foreign keys refer to rows or records in other tables. What does foreign keys refer to? What is a PRIMARY KEY? In the statement SELECT * the unique key for a table when exposed as a column clause. It modifies the verb `SELECT`. FROM Customers WHERE Age > 50;, what is the formal name for FROM Customers? An SQL statement is terminated a semicolon with _____. What is the proper syntax for SELECT FirstName AS "First Name"; aliasing a field? https://quizlet.com/621135511/sql-essential-training-flash-cards/ 2/4 3/16/22, 1:07 PM The _____ statement is used to SQL Essential Training Flashcards | Quizlet INSERT add a row to a table. In the statement COUNT(), to consider all rows. The asterisk is often used as a what does the mean? wild card. You can use the COUNT(*) True function to count all the rows in a table. TRUE How do you specify the by name or column heading; You can just use a columns to be selected? comma delimited list. You can query columns in any That is correct order. What is an example of a query SELECT * FROM Fruits WHERE Name = 'Apple'; to get only data containing the word "Apple"? The _____ clause is used with WHERE SELECT to filter rows. What is the function of an AS to name a column. An AS clause creates an alias clause? identifier for a column. The _____ statement is used to DELETE remove rows from a table. If you use UPDATE and SET The entire table is updated. Without a restriction, the without a WHERE clause, what statement applies to the whole table. Log in Sign up happens? The WHERE clause is used with Yes UPDATE to determine which rows are updated. https://quizlet.com/621135511/sql-essential-training-flash-cards/ 3/4 3/16/22, 1:07 PM SQL Essential Training Flashcards | Quizlet INSERT INTO customer (name, city, state) VALUES ('Jimi Hendrix', 'Renton', 'WA'); You do not need to Which statement would specify a value for every column. generate the fifth record in the following table? How can a row of data be INSERT INTO Animals (Name, Age, Type) VALUES inserted into a table named ('Fido', 10 'Dog'); Animals? https://quizlet.com/621135511/sql-essential-training-flash-cards/ 4/4