A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 6, Problem 1RQ
Program Plan Intro
SQL:
- SQL stands for “Structured Query Language”.
- The current version of SQL is “ANSI SQL – 92”.
- SQL is not a
programming language. It is text-based and it is also called as data sublanguage.- In order to get SQL as a complete programming language, it should be included in scripting languages like Java, C#, and so on.
- It contains constructs which are used to define and process
database . They are executed using DBMS-supplied command prompt. - Some of the DBMS products provide GUI tools in order to perform tasks are as follows:
- SQL Server
- Oracle Database
- MySQL
Data Definition Language (DDL):
- It is used for creating tables and other structures. They perform operations like, creating tables, modifying database, and removing database.
Expert Solution & Answer
Explanation of Solution
Table Creation:
Creating table comes under Data Definition Language (DDL).
- The “CREATE” command is employed for establishing databases on our platform by constructing tables in an already existing database.
The Syntax for creating table is as follows:
CREATE TABLE TABLE_NAME (
Column1 datatype,
Column2 datatype,
…
);
Example:
Creating table “EMP_1”:
CREATE TABLE EMP_1 ( EMP_NUM CHAR(3) , EMP_LNAME VARCHAR(15) , EMP_FNAME VARCHAR(15) , EMP_INITIAL CHAR(1), EMP_HIREDATE DATE, JOB_CODE CHAR(3));
Explanation:
The above query is used to create a table structure named “EMP_1” . The attribute “EMP_NUM”, “JOB_CODE”, “EMP_LNAME” and “EMP_FNAME” are declared.
Want to see more full solutions like this?
Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Which clause is used to change a column in a table?
a. SET
b. MODIFY
c. ALTER
d. UPDATE
Which command is used to modify the record of the table?
Which statement about subqueries is true?
a.
A subquery filters the same way an inner join does.
b.
More than one column can be listed in the select statement in the subquery
c.
Columns from a table in a subquery can be referenced in the main select statement
d.
A subquery filters the same way an outer join does
Chapter 6 Solutions
A Guide to SQL
Ch. 6 - Prob. 1RQCh. 6 - Which command and clause adds an individual row to...Ch. 6 - How do you add data from an existing table to...Ch. 6 - Prob. 4RQCh. 6 - Which command removes rows from a table?Ch. 6 - Which command makes updates permanent?Ch. 6 - Which command reverses updates? Which updates are...Ch. 6 - Prob. 8RQCh. 6 - What is the format of the SET clause that changes...Ch. 6 - Which command and clause adds a column to an...
Ch. 6 - Prob. 11RQCh. 6 - Which command deletes a table and all its data?Ch. 6 - Prob. 13RQCh. 6 - Prob. 1TDCh. 6 - Prob. 2TDCh. 6 - Prob. 3TDCh. 6 - Prob. 4TDCh. 6 - Prob. 5TDCh. 6 - Prob. 6TDCh. 6 - In the NONGAME table, change the category for item...Ch. 6 - Prob. 8TDCh. 6 - Prob. 9TDCh. 6 - Prob. 10TDCh. 6 - Prob. 11TDCh. 6 - Use SQL to make the following changes to the...Ch. 6 - Prob. 2CATCh. 6 - Prob. 3CATCh. 6 - Prob. 4CATCh. 6 - Prob. 5CATCh. 6 - Prob. 6CATCh. 6 - Add to the PADDLING table a new character column...Ch. 6 - Prob. 8CATCh. 6 - Prob. 9CATCh. 6 - Prob. 10CATCh. 6 - Prob. 11CATCh. 6 - Prob. 12CATCh. 6 - Use SQL to make the following changes to the...Ch. 6 - Prob. 2SCGCh. 6 - Prob. 3SCGCh. 6 - Prob. 4SCGCh. 6 - Prob. 5SCGCh. 6 - Prob. 6SCGCh. 6 - Prob. 7SCGCh. 6 - Prob. 8SCGCh. 6 - Prob. 9SCGCh. 6 - Prob. 10SCGCh. 6 - Prob. 11SCGCh. 6 - Prob. 12SCG
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Which of the following statements is correct? A table can contain a maximum of only one column marked as unused. You can delete a table by removing all columns in the table. Using the SET UNUSED clause allows you to free up storage space used by a column. None of the above statements are correct.arrow_forwardWhich of the following is not a correct statement? A table can be modified only if it doesn’t contain any rows of data. The maximum number of characters in a table name is 30. You can add more than one column at a time to a table. You can’t recover data contained in a table that has been truncated.arrow_forwardWhich of the following is true? a. If you truncate a table, you cant add new data to the table. b. If you change the default value of an existing column, all existing rows containing a NULL value in the same column are set to the new DEFAULT value. c. If you delete a column from a table, you cant add a column to the table with the same name as the previously deleted column. d. If you add a column to an existing table, its always added as the last column of the table.arrow_forward
- Which of the following is a valid table name? a. 9NEWTABLE b. DATE9 c. NEWTABLE d. None of the above are valid table names.arrow_forwardWhich of the following is a correct statement? You can restore the data deleted with the DROP COLUMN clause, but not the data deleted with the SET UNUSED clause. You can’t create empty tables—all tables must contain at least three rows of data. A table can contain a maximum of 1000 columns. The maximum length of a table name is 265 characters.arrow_forwardWhat is the maximum number of PRIMARY KEY constraints allowed for a table? a. 1 b. 2 c. 30 d. 255arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr