How to delete a child class at the same time as deleting a parent class

Updated on technology 2024-03-14
11 answers
  1. Anonymous users2024-02-06

    If the parent class and word class are in the same table: Change the delete method as follows:

    public void delete(int cate_id)stringbuilder strsql=new stringbuilder();

    delete from gcategory ");This is the added part.

    where parent_id=@cate_id ");This is the added part. It means a line break.

    delete from gcategory ");

    where cate_id=@cate_id ");

    sqlparameter parameters = ;

    parameters[0].value = cate_id;

    parameters);

  2. Anonymous users2024-02-05

    Then click Delete Subclass.

  3. Anonymous users2024-02-04

    constraint fk_father foreign key (fid) references yourtablename(id) on delete cascade

    If a record is deleted in this way, then all foreign keys connected to the record will be deleted in cascade (including the descendants of the descendants).

  4. Anonymous users2024-02-03

    For example, Table A is the parent table and has the following fields: id (primary key) and name.

    Table B is a sub-table with the following fields: id (primary key) and name.

    Set the primary key of Table A to the foreign key of Table B.

  5. Anonymous users2024-02-02

    No special statement is required, just set the table attribute to cascade deletion.

  6. Anonymous users2024-02-01

    A new class of an object is derived from an existing class, a process called inheritance.

    Child classes can inherit except for the private property in the parent class.

    If you don't need the properties of the parent class, you can override the original attributes.

    Similar to universality and particularity.

    For example, if there are people on the earth, people are divided into three types: yellow, black, and white, and at this time, all three of them inherit the basic attributes of human beings and have their own unique skin color attributes, and so on. Some people abandon their original peaceful attributes, encroach on other people's territories, enslave other peoples, and reverse other people's history, and then we call them "devils".

  7. Anonymous users2024-01-31

    Judging from the ** you posted,There should be no need to delete.,People、Animal are stateless functions.,There is no overwriting or modification.。

  8. Anonymous users2024-01-30

    That is to say, you have to delete the assigned value after assigning the value, otherwise if the method in the subclass has the same name as it, the value in the subclass will be automatically assigned to your parent class, the description is not very clear, is there a fuction father() {you didn't write it?}

  9. Anonymous users2024-01-29

    I often delete similar files you said with a batch process, del f a q 1

    rd /s /q \\1

    Save the file with the bat suffix, and then pull the file that cannot be deleted onto the batch file.

    This file states: "It is a vulnerability in Microsoft's system, and many security software and Trojans exploit it to create files that can penetrate and restore it." There are people in the Internet café who use this file to save their own private files, and I used to see some experts doing this often when I used to do Internet café maintenance.

    To illustrate:This trick XP works,Win7 has blocked this vulnerability,Even this trick is ineffective

  10. Anonymous users2024-01-28

    Hello, first of all, you make sure that your i drive exists or not, and the second is to see if you have the permission to open it.

  11. Anonymous users2024-01-27

    delete from product where id = parent id or big id = parent id

    The premise is that the big ID of your secondary category is associated with the ID of the parent class.

Related questions
6 answers2024-03-14

It's probably because when you install some software, there is a Google prompt that it is installed by default, and you didn't cancel it, so you installed Google's plugin. This plugin is maliciously attacked. >>>More

9 answers2024-03-14

Generally, there are several reasons why files cannot be deleted normally, and there are corresponding deletion methods for different situations: >>>More

7 answers2024-03-14

It's very common to delete by mistake. If you delete the important things, then I won't talk about them. >>>More

8 answers2024-03-14

Windows XP is a simple way to install in different partitions with Windows Vista. >>>More

18 answers2024-03-14

1.As an administrator, log in to the Control Panel - User Accounts - select Remove Password. >>>More