Answers for "how to create sql database"

SQL
5

sql crate database

CREATE DATABASE databasename;
Posted by: Guest on April-10-2020
4

create database sql

CREATE TABLE example (
    id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    username VARCHAR(50) NOT NULL UNIQUE,
    password VARCHAR(255) NOT NULL,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP

);
Posted by: Guest on October-23-2020
3

how to create a sql database

CREATE table songs (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  title TEXT,
  artist TEXT,
  mood TEXT,
  duration INTEGER,
  released INTEGER);
INSERT INTO songs (title, artist, mood, duration, released)
    VALUES ("Bohemian Rhapsody", "Queen", "epic", 60, 1975);
INSERT INTO songs (title, artist, mood, duration, released)
    VALUES ("Let it go", "Idina Menzel", "epic", 227, 2013);
INSERT INTO songs (title, artist, mood, duration, released)
    VALUES ("I will survive", "Gloria Gaynor", "epic", 198, 1978);
INSERT INTO songs (title, artist, mood, duration, released)
    VALUES ("Twist and Shout", "The Beatles", "happy", 152, 1963);
INSERT INTO songs (title, artist, mood, duration, released)
    VALUES ("La Bamba", "Ritchie Valens", "happy", 166, 1958);
INSERT INTO songs (title, artist, mood, duration, released)
    VALUES ("I will always love you", "Whitney Houston", "epic", 273, 1992);
INSERT INTO songs (title, artist, mood, duration, released)
    VALUES ("Sweet Caroline", "Neil Diamond", "happy", 201, 1969);
INSERT INTO songs (title, artist, mood, duration, released)
    VALUES ("Call me maybe", "Carly Rae Jepsen", "happy", 193, 2011);
   SELECT * FROM songs;
Posted by: Guest on April-25-2020
0

sql create database

Creates a new database.
Example: Creates a new database named ‘websitesetup’.
CREATE DATABASE websitesetup;
Posted by: Guest on January-07-2021
0

how to create sql database

Create DATABASE HP;
Posted by: Guest on July-05-2021
0

create a db

#TO Create a DB :
CREATE DATABASE <DB_NAME>;
#example : CREATE DATABASE MyDataBase ;
#To Create a Table :
CREATE TABLE <TB_NAME>(
    <Elem 0> <Type_of_Elem created> <ADD_PROPRETIES>, #Don't forget the comma
  	...
  	...
  	...
    <Elem n> <Type_of_Elem created> #last elems don't need a comma 
);
/*example :
CREATE TABLE city (
    id int  NOT NULL IDENTITY(1, 1),
    city_name char(128)  NOT NULL,
    lat decimal(9,6)  NOT NULL,
    long decimal(9,6)  NOT NULL,
    country_id int  NOT NULL,
    CONSTRAINT city_pk PRIMARY KEY  (id)
);
*/
Posted by: Guest on December-25-2020

Code answers related to "how to create sql database"

Code answers related to "SQL"

Browse Popular Code Answers by Language