Join Bill Weinman for an in-depth discussion in this video Storing numbers with INTEGER, part of PostgreSQL 9 with PHP Essential Training.
Integer types are useful wherever you need to store integer-numeric values.…In fact, they are commonly used for fixed-precision storage, even where those…values have a decimal part.…Here we have a table definition with two columns with integer types.…I want to go ahead and select Go, and that creates that table.…Then come over here to my 03-examples.sql from the Chap03 in the exercise files.…Down here at the bottom I have some inserts with various integer values.…
Now the basic integer type in Postgres is four bytes long, which means that this…third set of values is the minimum and maximum size number that can be stored…in a four-byte integer.…These are signed integers.…So minus this big number to plus that big number is as much as we can store.…So this fourth one should generate an exception, because that's a number that's…too big to store in a four-byte integer.…So I created this table with a standard integer type, which is four bytes,…so the first three inserts should be fine and the fourth one should create an error.…
- Installing PostgreSQL
- Understanding database architecture
- Inserting, updating, and deleting data in a table
- Creating a database library
- Indexing ID fields
- Storing numbers, text, and Boolean values
- Reading data
- Using casts to force type
- Using mathematical functions
- Concatenating strings
- Working with date and time functions and operators
- Defining CRUD
- Using PHP to insert, read, update, and delete rows in a database
Skill Level Beginner
PHP with MySQL Beyond the Basicswith Kevin Skoglund10h 26m Intermediate
1. Quick Start
2. Creating a Database
3. Data Types
4. Storing and Reading Data
5. SQL Expressions
6. Mathematical Functions and Operators
Using math functions3m 2s
7. String Functions and Operators
8. Date and Time Functions and Operators
9. PHP Interfaces
10. Web Applications
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.