[Postgres] Create a Postgres Table
2024-08-31 20:23:58
Learn how to create a table using the most widely-used data types (serial, varchar, integer, float, boolean, and date), and the most necessary constraints (NOT NULL and primary key).
CREATE TABLE directors (
id SERIAL PRIMARY KEY,
name VARCHAR() UNIQUE NOT NULL
); CREATE TABLE movies (
id SERIAL PRIMARY KEY,
title VARCHAR() NOT NULL,
release_date DATE,
count_stars INTEGER,
director_id INTEGER
);
最新文章
- C++运算符重载
- SVG简介
- 让dwz 在td里显示图片
- bitbucket和Mercurial安装和相关
- 使用 layoutopt 进行布局优化
- Unix时间戳(Unix timestamp)转换工具
- Duilib将UI资源文件打包到exe教程
- Codeforces Gym 100015C City Driving 离线LCA
- 如何设置 font-family 比较好以及字体的中英文名
- ssanf()的用法
- C++零食:使用Unicode版的预定义宏__FUNCTION__
- asp.net core mvc实现伪静态功能
- Redhat
- Android 组件化/模块化之路——在展示层搭建MVP结构
- Kafka中操作topic时 Error:Failed to parse the broker info from zookeeper
- 【转】linux下设置ssh无密码登录
- Android远程桌面助手扩展之微信跳一跳辅助
- [模板] 最近公共祖先/lca
- Python date,datetime,time等相关操作总结
- GNU Wget 1.19.1 static built on mingw32