Knowee
Questions
Features
Study Tools

write sql query for the following:1. create database - emp2.create table - employee with 4 columns3.To see table structure

Question

Write SQL query for the following:

  1. create database
  2. create table - employee with 4 columns
  3. To see table structure
🧐 Not the exact question you are looking for?Go ask a question

Solution

Sure, here are the SQL queries for your requirements:

  1. To create a database named 'emp':
CREATE DATABASE emp;
  1. To create a table named 'employee' with 4 columns (I'll assume the columns are id, name, position, and salary for this example):
USE emp;
CREATE TABLE employee (
    id INT PRIMARY KEY,
    name VARCHAR(100),
    position VARCHAR(100),
    salary DECIMAL(10,2)
);
  1. To see the structure of the 'employee' table:
DESCRIBE employee;

Please replace the column names and types in the 'CREATE TABLE' query with the ones you need for your table.

This problem has been solved

Similar Questions

write sql query for the following:1. create database - emp2.create table - employee with 4 columns3.To see table structure

Write a PHP program to connect to a database and create a database with employee table.

Refer to the given schema. Write a query to create customer and branch tables with the constraints mentioned.

Sketch a simple Entity Relational Diagram (ERD) of your table structure, including column names and data types.

Create Table Employee with attributes firstName,LastName,SSN,Address,Salary,Birthday,Sex,SupervisorSSN,DepartmentNo

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.