Find the SQL statement to write the database

Updated on technology 2024-04-09
7 answers
  1. Anonymous users2024-02-07

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

    where students. Student ID = Student Enrollment Course. Student ID and Course. Course number = student enrollment of the course. Course number.

    and students. Student ID='0001'

    select students. Student number, count (student chooses courses.) Student ID) as number of elective courses from student, student electives.

    where students. Student ID = Student Enrollment Course. Student ID=

    group by Student. Student ID=

  2. Anonymous users2024-02-06

    Query with table If there is a query with a right table, it is OK.

  3. Anonymous users2024-02-05

    I'm not familiar with it yet, so I'm learning slowly.

  4. Anonymous users2024-02-04

    1. Select Select * from table1 where range.

    2. Insert: insert into table1(field1,field2) values(value1,value2).

    3. Delete: Delete from table1 where range.

    4. Update: update table1 set field1=value1 where range.

    5. Sorting: select * from table1 order by field1, field2 [desc].

    6. Total: select count as totalcount from table1

    7. Summation: select sum(field1) as sumvalue from table1

    A few advanced query operators:

    a, union operator.

    The union operator derives a result table by combining two other result tables, such as table1 and table2, and eliminating any duplicate rows from the table. When all is used with union (i.e., union all), duplicate rows are not eliminated. In both cases, each row of the derived table is either from table1 or from table2.

    b. Except operator.

    The except operator derives a result table by including all rows that are in table1 but not in table2 and eliminating all duplicate rows. When all is used with except all, duplicate rows are not eliminated.

    c, intersect operator.

    The intersect operator derives a result table by including only the rows that are present in both table1 and table2 and eliminating all duplicate rows. When all is used with intersect (intersect all), duplicate rows are not eliminated.

  5. Anonymous users2024-02-03

    1 select * from table name where department id = 20

    2 select Employee Number, Employee Name, Department Number from Table Name where Job Type=Clerk

    3 select * from table name where comm>sal

    4 select * from table name where comm>(sal*.)

    5 select * from table name where (department id = 10 and job type=manager) or (department id = 20 and job type=clerk).

    6 select * from Table Name where Job! =manager and type of work! =Clerk and Salary, 1999

    7 select job from table name where bonus != null

  6. Anonymous users2024-02-02

    select * from Employee Information Table.

    select Employee Number, Employee Name, Department Number from Table Name where Job Type=Clerk

    select * from table name where comm>sal

  7. Anonymous users2024-02-01

    14 select * from table name where name like'%m%'

    15 select * from table name where name like'?m%'

    Let someone else make it up, it's too much.

Related questions
3 answers2024-04-09

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

10 answers2024-04-09

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

10 answers2024-04-09

select * from table name where lab='101'and name='Sulfuric acid', don't know your table structure, so to give you the simplest select, you can talk about your table structure.

13 answers2024-04-09

You go to the service manager to see if any service is being shut down. Control Panel - Management Tools - Computer Management Panel, there is a service and application in it, open the service panel, you can see the startup status of the series of services on the right, mainly whether the mssqlsever service is started, and then you try to modify the startup state. >>>More

8 answers2024-04-09

Master the basic syntax, look at the implementation of functional requirements, and take a look at the well-written examples.