bpandey23 commited on
Commit
131d1e4
1 Parent(s): 9647270

Create init.sql

Browse files
Files changed (1) hide show
  1. init.sql +18 -0
init.sql ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -- Create a new database
2
+ CREATE DATABASE mydb;
3
+
4
+ -- Connect to the new database
5
+ \c mydb;
6
+
7
+ -- Create a new table
8
+ CREATE TABLE users (
9
+ id SERIAL PRIMARY KEY,
10
+ name VARCHAR(50) NOT NULL,
11
+ email VARCHAR(50) UNIQUE NOT NULL
12
+ );
13
+
14
+ -- Insert some sample data
15
+ INSERT INTO users (name, email) VALUES
16
+ ('John Doe', '[email protected]'),
17
+ ('Jane Smith', '[email protected]'),
18
+ ('Bob Johnson', '[email protected]');