Answers for "command to create table in postgresql"

SQL
12

create table in postgresql

-- Example table
 CREATE TABLE accounts (
	user_id serial PRIMARY KEY,
	username VARCHAR ( 50 ) UNIQUE NOT NULL,
	password VARCHAR ( 50 ) NOT NULL,
	email VARCHAR ( 255 ) UNIQUE NOT NULL,
	created_on TIMESTAMP NOT NULL,
        last_login TIMESTAMP 
);
Posted by: Guest on December-12-2020
0

create table postgres ubuntu

CREATE TABLE pg_equipment (
	equip_id serial PRIMARY KEY,
	type varchar (50) NOT NULL,
	color varchar (25) NOT NULL,
	location varchar(25) check (location in ('north', 'south', 'west', 'east', 'northeast', 'southeast', 'southwest', 'northwest')),
	install_date date
	);
Posted by: Guest on May-21-2021

Code answers related to "command to create table in postgresql"

Code answers related to "SQL"

Browse Popular Code Answers by Language