我有一张桌子:
id | name1 | name2 | name3
1 | asa | NULL | das
2 | NULL | NULL | asas
我想删除有两次或多次NULL值的每一行(这里,id为2的
那个)我已经用一个小的PHP脚本做了但我不知道是否可以用mysql查询完成
我是mysql的新手,所以我还没有尝试过任何东西!
我的程序在下面反转一个字符串,而不是通过字符而不是字.
示例输入 Hello Mello Sanple输出 Hello Mello Hello
我不知道我从哪里得到第一个Hello.
#include "stdafx.h"
#include <iostream>
int main(int argc, char **argv)
{
char input[255];
char *head; // head of a word.
char *tail; // tail of a word.
printf("Enter a sentence: ");
gets_s(input); // read a whole line.
tail = input + strlen(input) - 1;
while (tail >= input)
{
if (*tail == 0 || *tail == ' ')
{
tail--; // move to the tail of a word.
}
else
{
tail[1] …Run Code Online (Sandbox Code Playgroud)