Answers for "how to Create Database"

SQL
0

how to create sql database

Create DATABASE HP;
Posted by: Guest on July-05-2021
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

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
1

CREATE DATABASE DatabaseName;

SHOW DATABASES;
 DROP DATABASE testDB;
 USE DatabaseName;
 
 SQL> CREATE TABLE CUSTOMERS(
   ID   INT              NOT NULL,
   NAME VARCHAR (20)     NOT NULL,
   AGE  INT              NOT NULL,
   ADDRESS  CHAR (25) ,
   SALARY   DECIMAL (18, 2),       
   PRIMARY KEY (ID)
);

DESC CUSTOMERS;
Posted by: Guest on August-05-2020
0

creating custom database

use IlluminateSupportFacadesDB;

// Connection name = `mysql` for me, adjust as suits for you
DB::connection('mysql')->statement("CREATE DATABASE ?", [$this->database]);
// Simply written
DB::connection('mysql')->statement("CREATE DATABASE my_new_db");
Posted by: Guest on August-09-2021

Code answers related to "how to Create Database"

Code answers related to "SQL"

Browse Popular Code Answers by Language