Home > database >  Urgent urgent, SQL great spirit
Urgent urgent, SQL great spirit

Time:11-18

Table name to create a view of fuzzy query, query to the table of contents, must also is the latest table that day, and how to write?
Need in Navicat for Mysql inside use SQL to create, if just the SQL,
Set @ STR=CONCAT (' select * from online_real_data_d_8_ ', DATE_FORMAT (now (), '% Y % m % d));

Prepare STMT from @ STR;

The execute STMT

This can be achieved, but now I want to create a view, can't use it,

CodePudding user response:

In the sys. All_objects contains all database objects, you find out the type=U, create_date can find all the shows, and then query for each table,

CodePudding user response:

Check all the table names: conditions can add
 
The select table_name from information_schema. Tables where table_schema='CSDB' and table_type='base table'

CodePudding user response:

Didn't understand,,,,,

CodePudding user response:

The
reference 3 floor weixin_45295507 response:
didn't understand,,,,,,,

You can baidu once all MySQL query table statement, and then found out you can see have built table time field,
According to the time field, to obtain so you want to watch,
  • Related