“creando mesa en mysql” Código de respuesta

Crear mesa mysql

CREATE TABLE IF NOT EXISTS tasks (
    task_id INT AUTO_INCREMENT PRIMARY KEY,
    title VARCHAR(255) NOT NULL,
    start_date DATE,
    due_date DATE,
    status TINYINT NOT NULL,
    priority TINYINT NOT NULL,
    description TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)  ENGINE=INNODB;
Nathan Stanford

Crea la consulta MySQL de la mesa

create table tutorials_tbl(
   tutorial_id INT NOT NULL AUTO_INCREMENT,
   tutorial_title VARCHAR(100) NOT NULL,
   tutorial_author VARCHAR(40) NOT NULL,
   submission_date DATE,
   PRIMARY KEY ( tutorial_id )
);
Thankful Tamarin

Crear mesa en mysql

CREATE TABLE users(
id INT AUTO_INCREMENT,
   first_name VARCHAR(100),
   last_name VARCHAR(100),
   email VARCHAR(50),
   password VARCHAR(20),
   location VARCHAR(100),
   dept VARCHAR(100),
   is_admin TINYINT(1),
   register_date DATETIME,
   PRIMARY KEY(id)
);
Gaurav Gupta

Crear mesa mysql

CREATE TABLE IF NOT EXISTS `sys_user_details` (
    user_detail_id INT(11) AUTO_INCREMENT,
    user_id INT(11),
    name VARCHAR(100) NOT NULL,
    email VARCHAR(200) NOT NULL,
    education VARCHAR(100) DEFAULT NULL,
    skills VARCHAR(100) DEFAULT NULL,
    experience VARCHAR(100) DEFAULT NULL,
    CONSTRAINT PK_sys_user_details PRIMARY KEY (user_detail_id),
    CONSTRAINT FK_sys_user_details_user_id FOREIGN KEY (user_id)
    REFERENCES sys_user(user_id)
        ON UPDATE RESTRICT ON DELETE CASCADE
);
Successful Swiftlet

creando mesa en mysql

#Assuming that there is a database called MyDatabase
#creates a table called TableName, with columns Name, Age, and Class
Use MyDatabase;
create table TableName(
  No. int primary key,
  Name varchar(50),
  Age int,
  Class varchar(15));
VinCoD

Crear tabla de Query MySQL

CREATE TABLE prices_published_april_25 
SELECT prices_held_feb_3_2022.id,prices_held_feb_3_2022.unique_batch_id,prices_held_feb_3_2022.commodity_id,prices_held_feb_3_2022.variety_id,prices_held_feb_3_2022.price1,prices_held_feb_3_2022.price2,prices_held_feb_3_2022.price3,prices_held_feb_3_2022.price4,prices_held_feb_3_2022.price5,prices_held_feb_3_2022.availability_type_id,prices_held_feb_3_2022.grade_id,prices_held_feb_3_2022.batch_id,prices_held_feb_3_2022.user_id,prices_held_feb_3_2022.unit_id,prices_held_feb_3_2022.created_at,prices_held_feb_3_2022.updated_at,batches.batch_date,batches.published_date,batches.is_published,commodities.commodity,commodities.type_id AS commodity_type_id FROM `prices_held_feb_3_2022` 
inner join `batches` on `prices_held_feb_3_2022`.`batch_id` = `batches`.`id` 
inner join `commodities` on `prices_held_feb_3_2022`.`commodity_id` = `commodities`.`id` 
WHERE `batches`.`is_published` = 'YES' 
order by `commodities`.`commodity` asc
Tame Tortoise

Respuestas similares a “creando mesa en mysql”

Preguntas similares a “creando mesa en mysql”

Más respuestas relacionadas con “creando mesa en mysql” en Sql

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código