Preview

Mysql

Satisfactory Essays
Open Document
Open Document
840 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Mysql
Enter password: *****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.29 MySQL Community Server (GPL)

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database company;
Query OK, 1 row affected (0.02 sec)

mysql> use company;
Database changed mysql> create table salesman(SID char(5) primary key,Sname char(10) not null,Cit y char(15),Salary int(5),product int(20),target int(10));
Query OK, 0 rows affected (0.42 sec)

mysql> create table salesman(SID char(5) primary key,Sname char(10) not null,Cit y char(15),Salary int(5),product char(20),target int(10));
ERROR 1050 (42S01): Table 'salesman' already exists mysql> create table Salesman(SID char(5) primary key,Sname char(10) not null,Cit y char(15),Salary int(5),product char(20),target int(10));
ERROR 1050 (42S01): Table 'salesman' already exists mysql> create table Salesman1(SID char(5) primary key,Sname char(10) not null,Ci ty char(15),Salary int(5),product char(20),target int(10));
Query OK, 0 rows affected (0.00 sec)

mysql> insert into salesman1 values("sA","Rahul","Noida",15,000,"books",100);
ERROR 1136 (21S01): Column count doesn't match value count at row 1 mysql> insert into salesman1 values("sA","Rahul","Noida",15000,"books",100);
Query OK, 1 row affected (0.06 sec)

mysql> insert into salesman1 values("sB","Rohan","Delhi",25000,"Notebook",150);
Query OK, 1 row affected (0.28 sec)

mysql> insert into salesman1 values("sC","Jitu","Mumbai",21200,"Paper",250);
Query OK, 1 row affected (0.31 sec)

mysql> insert into salesman1 values("sD","Atul","Ghaziabad",10200,"Register",300
);
Query OK, 1 row affected (0.30 sec)

You May Also Find These Documents Helpful

  • Good Essays

    Each query in the script file you will create must be numbered (use --1 comments for numbering) and in order. The SQL for the following exercises should be written using notepad and run in SQL*Plus.…

    • 1559 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    Hiredate DATE No No Job VARCHAR2(15) No No Mgrno number(4) no no yes ( to emp.empno) Salary number(8,2) no no Comm number(8,2) no no Deptno number(2) no no yes ( to…

    • 1169 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    M1 Unit 4 Assignment

    • 438 Words
    • 2 Pages

    2. Update the employee table and provide a salary for each employee using the salary column added in the previous problem. Validate the rows are there using a SELECT clause.…

    • 438 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Creating tables in the graphical interface is not the only way to create a table. It is also possible to create the table using the SQL programming language.…

    • 327 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    2. SELECT e.ename, e.deptno, d.dname, d.deptno FROM emp e LEFT OUTER JOIN dept d ON e.deptno = d.deptno ORDER BY e.deptno, e.ename; SQL> SELECT e.ename, e.deptno, d.dname, d.deptno 2 FROM emp e 3 LEFT OUTER JOIN dept d 4 ON e.deptno = d.deptno 5 ORDER BY e.deptno, e.ename; ENAME DEPTNO DNAME DEPTNO ---------- ----------…

    • 1542 Words
    • 7 Pages
    Good Essays
  • Good Essays

    Kudler Fine Food Week 4

    • 284 Words
    • 2 Pages

    Note: Select all of the data from both of your tables before you perform the following.…

    • 284 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    C_Name, C_Phone  CUSTOMER 9. RENTAL (Confirm_No, Vehicle_ID, Pickupmile, Returnmile, Ren_Pickupdate, Ren_Returndate) FK Confirm_No  RESERVATION FK Vehicle_ID  CAR 10. INVOICE (Inv_No, Confirm_No, Vehicle_ID, Inv_Date, Inv_Amount) FK Confirm_No, Vehicle_ID …

    • 182 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    a guide to mysql ch 7

    • 1287 Words
    • 9 Pages

    Except where indicated, use MySQL Query Browser to perform each operation and print the results.…

    • 1287 Words
    • 9 Pages
    Powerful Essays
  • Powerful Essays

    ( NAME = N'Jeff Thompson Sr - POS 410 - IA - KVO_log', FILENAME = N'D:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Jeff Thompson Sr - POS 410 - IA - KVO_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)…

    • 1555 Words
    • 7 Pages
    Powerful Essays
  • Satisfactory Essays

    SQL Queries

    • 423 Words
    • 2 Pages

    Given the table information above, if you were asked to create an Access query that showed the Student Name and Grade for all students taking a class in Room H201, what tables would you need and how would you link them together?…

    • 423 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Database Management

    • 613 Words
    • 3 Pages

    In his book Groupware -- Computer Support for Business Teams, Robert Johansen defines groupware as "specialized computer aids that are designed for the use of collaborative work groups." This definition is better than the "shared data" definition because it helps eliminate multiuser databases from the groupware category. Yet electronic mail fits this definition, as well as some other software sharing tools that experts are still debating.…

    • 613 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Sql-Cheat-Sheet

    • 360 Words
    • 2 Pages

           SQL Facts SQL stands for Structured Query Language SQL is pronounced “sequel” SQL is declarative language SQL is used to access & manipulate data in databases Top SQL DBs are MS SQL Server, Oracle, DB2, and MySQL Database Definitions RDBMS (Relational Database Management System) – Software that stores and manipulates data arranged in relational database tables.…

    • 360 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Database Project

    • 1591 Words
    • 7 Pages

    AGGREGATED CATERING SYSTEM PROJECT REPORT 11/12/2012 Contents 1 Problem Description ..............................................................................................................................................3 1.1 Description of the organization ................................................................................................................ 3 1.2 Scope of the database .................................................................................................................................... 3 2 Entity-Relationship Diagram .............................................................................................................................. 4 3 Relational Database Schema ...............................................................................................................................5 4 Printouts of Data Input Screen Form ..............................................................................................................6 4.1 Flavor Input Screen Forms ..........................................................................................................................6 4.2 Restaurant Input Screen Forms ................................................................................................................…

    • 1591 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    Sql basics

    • 584 Words
    • 3 Pages

    The SQL CROSS JOIN produces a result set which is the number of rows in the…

    • 584 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    MySQL RefManual A

    • 635 Words
    • 5 Pages

    upgrade the server from 4.1, attempts to connect to it with an older client may…

    • 635 Words
    • 5 Pages
    Powerful Essays

Related Topics