How to implement SQL statements to obtain database data examples .

Updated on technology 2024-05-10
10 answers
  1. Anonymous users2024-02-10

    1: Create a new database.

    create database database name.

    2: Create a table.

    create table table name.

    Whether the field name Type is empty.

    3: Delete a table.

    drop table name.

    4: Add a record.

    insert table name [(field)] values (contents)5: Deletes a record.

    delete [from] table name where Condition 6, modify a record.

    update table name set field name = update content where condition 7, add a field to the original table.

    alter table add column field name Type 8: Deletes a field from the original table.

    alter table table name drop column field name 9, query a table record.

    select * from the table name.

    10. Query a table record with conditions.

    select * from table name where = condition.

  2. Anonymous users2024-02-09

    Boss: You're going to solve it, tell me.

  3. Anonymous users2024-02-08

    insert into testtb01(name) values ('tongqiang')

    You're not a kanji either.

    Character-based data must be inserted and queried with a pair of English single quotation marks, as I did above.

  4. Anonymous users2024-02-07

    If you only use it occasionally, it is recommended to use:

    select * from

    If you use it for a long time, it is good to specify the connection of the program: such as the second floor:

    sqlconnection mysql = new sqlconnection("data source=localhost;integrated security=true;initial catalog= database1");

  5. Anonymous users2024-02-06

    This is a connection connection setting issue and has nothing to do with SQL statements.

    sqlconnection mysql = new sqlconnection("data source=localhost;integrated security=true;initial catalog= database1");

  6. Anonymous users2024-02-05

    MySQL does not support the top syntax, top is the syntax in sqlserver, if you want to check the first piece of data, use it like this.

    select * from henweight order by datetime desc limit 0,1

    Or select * from henweight order by datetime desc limit 1

  7. Anonymous users2024-02-04

    MySQL does not support the top syntax, you can use limit

    For example, select * from henweight order by datetime desc limit 0,1

  8. Anonymous users2024-02-03

    I know this question.

    It is recommended that you use the "SATH QQ Stranger Promotion Assistant".

    You don't need to add friends to send messages directly.

    There is absolutely no problem with quoting 10,000 unique IPs per day.

  9. Anonymous users2024-02-02

    I didn't find a problem, except that the statement should be written in a standard, for example, there is a space in the middle of the from table, and there are spaces before and after, 10pname,pbirthday,cdate,eballs( pcity='Guangzhou'(players balls))) I don't know what that means.

  10. Anonymous users2024-02-01

    To give you an idea, I don't know what database you are, take sqlserver as an example select t* from

    select row number() over (order by time) rn, the name of the table. * from Table Name) t

    where rn%30=1

    That is, use the line number to remove the remainder, and take out the remainder = 1, so that you can take 1 out of every 30.

Related questions
3 answers2024-05-10

At least the basic things must be mastered, such as: the linear structure of the database, the storage method, the way to call Hezheng, and the operation of the table in the database (to use statements to erect the bench to achieve). >>>More

7 answers2024-05-10

Select Courses. Course name, course. Teacher's name from student, course, student selection. >>>More

11 answers2024-05-10

To filter the email questions to please add to see who adds the most ?? >>>More

7 answers2024-05-10

You've fallen into a trap you've set yourself.

Your problem can be solved, but it's not very efficient. >>>More

10 answers2024-05-10

The steps to uninstall the SQL Server database are as follows: >>>More