You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try inserting values with incorrect data types into a table. Note
the errors and then insert values with correct data types into the
same table.
Using your database system, try exporting a table (or an entire
database) to some other format. Then import the data back into your
database. Familiarize yourself with this capability. Also, export
the tables to another database format if your DBMS supports this
feature. Then use the other system to open these files and examine
them.
Creating and Maintaining Tables
True or False: The ALTER DATABASE statement is often used to
modify an existing table’s structure.
True or False: The DROP TABLE command is functionally equivalent
to the DELETE FROM <table_name> command.
True or False: To add a new table to a database, use the CREATE TABLE command.
What is wrong with the following statement?
CREATETABLEnew_table (
ID NUMBER,
FIELD1 char(40),
FIELD2 char(80),
ID char(40);
What is wrong with the following statement?
ALTERDATABASE BILLS (
COMPANY char(80));
When a table is created, who is the owner?
If data in a character column has varying lengths, what is the best choice for the data type?
Add two tables to the BILLS database named BANK and ACCOUNT_TYPE
using any format you like. The BANK table should contain
information about the BANK field used in the BANK_ACCOUNTS table
in the examples. The ACCOUNT_TYPE table should contain information
about the ACCOUNT_TYPE field in the BANK_ACCOUNTS table also. Try
to reduce the data as much as possible.
You should use the CREATE TABLE command to make the tables. Possible
SQL statements would look like this:
CREATETABLEBANK
( ACCOUNT_ID NUMBER(30) NOT NULL,
BANK_NAME VARCHAR2(30) NOT NULL,
ST_ADDRESS VARCHAR2(30) NOT NULL,
CITY VARCHAR2(15) NOT NULL,
STATE CHAR(2) NOT NULL,
ZIP NUMBER(5) NOT NULL;
CREATETABLEACCOUNT_TYPE
( ACCOUNT_ID NUMBER(30) NOT NULL,
SAVINGS CHAR(30),
CHECKING CHAR(30);