Computer Science > EXAM > C170 58 Question MultChoice OA StudyGuide - SQL Commands (All)
SQL Commands Please take a look at this list and review any that seem unfamiliar: CREATE TABLE statements and data type assignments create table "tablename" ("column1" "data type", "column2" "da... ta type", "column3" "data type"); Here are the most common Data types: char(size) Fixed-length character string. Size is specified in parenthesis. Max 255 bytes. varchar(size) Variable-length character string. Max size is specified in parenthesis. number(size) Number value with a max number of column digits specified in parenthesis. date Date value number(size,d) Number value with a maximum number of digits of "size" total, with a maximum number of "d" digits to the right of the decimal. CREATE TABLE … LIKE Use CREATE TABLE ... LIKE to create an empty table based on the definition of another table, including any column attributes and indexes defined in the original table: CREATE TABLE new_tbl LIKE orig_tbl; CREATE TABLE ... LIKE creates a new table as an empty copy of the original one. It copies the original table structure exactly, so that each column is preserved with all of its attributes. The index structure is copied as well. However, the new table is empty, so to populate it a second statement is needed (such as INSERT INTO ... SELECT). Also, CREATE TABLE ... LIKE cannot create a new table from a subset of the original table's columns, and it cannot use columns from any other table but the original one. To use CREATE TABLE ... LIKE for cr [Show More]
Last updated: 2 years ago
Preview 1 out of 16 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
WGU c170 TESTS COMPILATION BUNDLE
By Crum 2 years ago
$15.5
13
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Oct 21, 2022
Number of pages
16
Written in
This document has been written for:
Uploaded
Oct 21, 2022
Downloads
0
Views
83
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·