SQL Tutorial 3: Sequence and Import Statement

Pubblicato il: 27 November 2014
sul canale di: Jerry Esperanza
5,704
21

The video starts to discuss the importance of setting constraints in columns as you create or set your table. It is not only applicable to DB2 but to all other database products such as SQL Server, MySQL, Oracle, Informix. The quality of data that is inputted in your database may be increased with setting up of CONSTRAINTS.

Example of constraints are DEFAULT, CHECK, PRIMARY KEY or FOREIGN KEY. Foreign key is used with REFERENCE to check existence of codes on other tables.

Primary key is not exclusive to one column alone. It may comprise multiple columns that can be defined as primary key. A primary key with multiple columns is set to be a composite key.

It explains also on how a sequence is used inside a database or table. Sequence is effective when generating a number such as employee number or specific coding format with interval. An LPAD() function (left padding) is also used as applied to sequence.

Inserting row or record in a table may be a tedious process compared if you prepare it first in a spreadsheet. This is where we use you the IMPORT command to read a text file. A comma delimited values (CSV) format was used in importing the records.


In questa pagina del sito puoi guardare il video online SQL Tutorial 3: Sequence and Import Statement della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Jerry Esperanza 27 November 2014, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 5,704 volte e gli è piaciuto 21 spettatori. Buona visione!