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

  • 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

    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
  • 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
  • Good Essays

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

    • 1542 Words
    • 7 Pages
    Good 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
  • Satisfactory Essays

    References: Pratt, P. J., & Last, M. Z. (2006). A Guide to MySQL . Boston, Massachusetts: Course Technology.…

    • 677 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Database Sql Server

    • 328 Words
    • 2 Pages

    Data mining uses business intelligence tools and techniques on a variety of data sources brought together in a data warehouses. true…

    • 328 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
  • Good Essays

    Sql Server

    • 973 Words
    • 4 Pages

    The purpose of this paper is to provide a comprehensive review of the SQL Server 2005 Express Edition for Beginners tutorial. The SQL Server 2005 Express database tutorial helps users understand what a database is, it explains how to create tables within a database and how users can covert flat databases into relational databases. This tutorial was basically designed to give users the basic knowledge of creating data bases. Databases are nothing more than a collection of files that work together to store data in a structured way. Some databases are made up simple files and others may require that severs manages connections to files within in a database to authenticate users that’s accessing those files. One of the main focuses of databases is how well organizations manage their database and maintains the accuracy of their data. Companies may want to use databases instead of text files because they provides them with more efficient data integrity, they can store more data, they can retrieve data in multiple ways, databases also provides organizations with the ability to protect their data from unauthorized users and protects their data from being corrupt. Relational Database Management Systems makes managing data for companies easier and it takes care of the difficult tasks associate with integrating data into their applications. Relational databases are the most common type of databases that are used today. The eliminate data redundancy which could cause companies to enter inaccurate data into their databases. Before relational databases were created data was managed by mainframe computers and the storage capacity was limited and very expensive to maintain. Relational databases reduces the amount of space on reel-to-real tapes that each database record required and they also reduced the cost of storing data and provided data integrity. Data integrity refers to the accuracy of the data that organizations are storing. With relational databases…

    • 973 Words
    • 4 Pages
    Good 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