MySQL database, the last four questions

Updated on technology 2024-05-24
6 answers
  1. Anonymous users2024-02-11

    You want to complete it with SQL statements, you really can't see this diagram clearly, your eyes are going to be blind, if there is something wrong, change it yourself.

    Question 1: Insert data:

    insert into t_book

    values('004','College English','c01',''Question 2: select * form t speciality tjoin t book t1 on =

    where = 'E-commerce'

    Question 3: select * form t speciality tjoin t book t1 on =

    join t_purchase t2 on =where = 'E-commerce'

    Question 4. select from t_purchase tjoin t_book t1 on =

    where ='Ideology and politics'

    Question 5. create view view_name asselect ,,from t_purchase tjoin t_book t1 on =

    I won't store the procedure.

  2. Anonymous users2024-02-10

    Can you send it to me privately?

  3. Anonymous users2024-02-09

    You can use nested expressions with floor and rand functions to generate a random number between 1 and 4 for each row of records, and then sort the record rows with that random number, so that the number of columns can be randomly divided into four groups. Of course, the number of rows in the table cannot be too small, otherwise it is not guaranteed that there will be at least 4 groups.

    Let's assume that the table name is t1 and the field name is num

    select t.* from

    select floor(4* rand()+1) as groupname,num from t1) t order by ;

  4. Anonymous users2024-02-08

    Prep the field with convert(decimal(12,4),click).

    Convert to dectmal type The second parameter is 4 decimal places.

    Divide it!

  5. Anonymous users2024-02-07

    1 If the version number of a mysql does not have a suffix, it means that the version has been running in many places for a while, and.

    There are no non-platform-specific bug reports. We often call this a version.

    2 There are several ways to provide options for MySQL programs:

    1) Provide it in the command line after the program name.

    2) Read the settings in the program at startup.

    3) Set in .

    3 When you create a database, you can use clauses to ensure that you create the database if it doesn't exist, and use it directly if it exists.

    Type 4 data can be understood as a string that can only take a few specified values.

    6 The following statement can be used to select records from 10 to 20 from Table A: select * from a 10 10

  6. Anonymous users2024-02-06

    The first database.

    BaiInformation Schema: provides a way for DDU to access metadata in the database.

    Metadata is data about data, such as:

    DAO database name or table name, data type of column, or access permissions, etc. Other terms that are sometimes used to describe this information include "data dictionary" and "system catalog".

    The Information Schema is a database of information that holds information about all other databases maintained by the MySQL server. In the information schema, there are several read-only tables. They're actually views, not basic tables, so you won't be able to see any files related to them.

    Each MySQL user has access to these tables, but only in specific rows of the tables that contain objects to which the user has the appropriate access.

    The second database MySQL: This is the core database of MySQL, similar to the master table in SQL Server, which is mainly responsible for storing the control and management information that MySQL needs to use, such as users, permission settings, and keywords of the database. If you don't know much about MySQL, don't easily modify the table information in this database.

Related questions
5 answers2024-05-24

It seems that there is something called triggers in the DB, and there seems to be another thing called transactions.

16 answers2024-05-24

The 3 integers of only 200w are definitely no problem, and they don't hit without tens of millions of influences. >>>More

7 answers2024-05-24

Method 1: Leverage the Metadata Locks view.

This method is only applicable to MySQL versions or later, and the performance schema adds Metadata Locks, which can easily locate the global lock session if the probe with metadata lock enabled before locking (the default is not enabled). >>>More

7 answers2024-05-24

First: you are lazy and push everything to someone else.

Second: There are no bonus points for your question. >>>More

4 answers2024-05-24

MySQL exports the specified data table and data [command].