# Simple table describing a vehicleCREATETABLEvehicle(
# vehicleId: Unique ID for Primary Key.# This is how we will reference a record
vehicleId INTNOTNULL,
make VARCHAR(64), # String 64 chars max
model VARCHAR(128),
derivative VARCHAR(255),
PRIMARYKEY(vehicleId)
);
# Add a recordINSERTINTO vehicle VALUES(1000,'Volkswagen','Golf','1.5 TSI EVO Match Edition 5dr');
Posted by: Guest
on February-21-2020
9
create table sql
CREATETABLEtable_name(
id INTAUTO_INCREMENTPRIMARYKEY,
name VARCHAR(255), # String 255 chars max
date DATETIMENOTNULLDEFAULTCURRENT_TIMESTAMP,
longtext BLOB
);
Posted by: Guest
on July-14-2020
0
creating a table in sql
//to create a tableCREATETABLE students
( student_id number(4) primary key,
last_name varchar2(30) NOTNULL,
course_id number(4) NULL );
//to insert valueINSERTINTO students VALUES (200, 'Jones', 101);
INSERTINTO students VALUES (201, 'Smith', 101);
INSERTINTO students VALUE (202, 'Lee' , 102);
Posted by: Guest
on January-28-2021
0
Create Table
CREATETABLE users (
id SERIALPRIMARYKEY,
email VARCHAR(255) NOTNULL,
password VARCHAR(255) NOTNULL,
created TIMESTAMP,
modified TIMESTAMP
);
CREATETABLE articles (
id SERIALPRIMARYKEY,
user_id INTNOTNULL,
title VARCHAR(255) NOTNULL,
slug VARCHAR(191) NOTNULL,
body TEXT,
published BOOLEANDEFAULTFALSE,
created TIMESTAMP,
modified TIMESTAMP,
UNIQUE (slug),
FOREIGNKEY (user_id) REFERENCESusers(id)
);
CREATETABLE tags (
id SERIALPRIMARYKEY,
title VARCHAR(191),
created TIMESTAMP,
modified TIMESTAMP,
UNIQUE (title)
);
CREATETABLE articles_tags (
article_id INTNOTNULL,
tag_id INTNOTNULL,
PRIMARYKEY (article_id, tag_id),
FOREIGNKEY (tag_id) REFERENCEStags(id),
FOREIGNKEY (article_id) REFERENCESarticles(id)
);
INSERTINTO users (email, password, created, modified)
VALUES
('cakephp@example.com', 'secret', NOW(), NOW());
INSERTINTO articles (user_id, title, slug, body, published, created, modified)
VALUES
(1, 'First Post', 'first-post', 'This is the first post.', TRUE, NOW(), NOW());
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems
resetting your password contact us
Check Your Email and Click on the link sent to your email