Answers for "create database in mySQL"

SQL
13

create database mysql

CREATE DATABASE `mydb`;

CREATE TABLE `my_table`
(
	my_table_id INT AUTO_INCREMENT,
    my_table_name VARCHAR(30) NOT NULL,
    my_foreign_key INT NOT NULL,
    my_tb_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  	my_tb_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ,
    # Any other properties here
    PRIMARY KEY(my_table_id),
    CONSTRAINT fk_name_of_parent_table
    FOREIGN KEY(my_foreign_key) REFERENCES parent_table(parent_table_column)
);

SHOW DATABASES;
Posted by: Guest on February-08-2020
1

mysql create database

CREATE DATABASE mydatabase CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
Posted by: Guest on September-24-2020
1

create database in mySQL

CREATE DATABASE nameOfYourDatabase;
USE nameOfYourDatabase;
CREATE TABLE nameOfTable(
id INT AUTO_INCREMENT,
   first_name VARCHAR(100),
   last_name VARCHAR(100),
   email VARCHAR(50),
   password VARCHAR(20),
   PRIMARY KEY(id)
);
Posted by: Guest on October-27-2021
0

create mysql database

mysql -u username -p
CREATE DATABASE dbname;
Posted by: Guest on August-08-2021
2

how to create database using cmd mysql

CREATE DATABASE [IF NOT EXISTS] database_name
[CHARACTER SET charset_name]
[COLLATE collation_name]
Posted by: Guest on February-24-2020
2

MySQL CREATE DATABASE

MySQL implements a database as a directory that contains all files which correspond to tables in the database.

To create a new database in MySQL, you use the CREATE DATABASE statement with the following syntax:

CREATE DATABASE [IF NOT EXISTS] database_name
[CHARACTER SET charset_name]
[COLLATE collation_name]
Posted by: Guest on October-19-2020

Code answers related to "create database in mySQL"

Code answers related to "SQL"

Browse Popular Code Answers by Language