Win32 快捷方式操作助手类(Lnk快捷方式)

2024-01-25 00:44

本文主要是介绍Win32 快捷方式操作助手类(Lnk快捷方式),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

将快捷方式的操作做了一个简单封装, 方便使用.

//解析Lnk内容
{CLnkHelper obj;obj.Load(_T("123.lnk"));SHELL_LINK_INFO info = obj.GetInfo();//TODO 使用info的内容
}//创建(另存为)快捷方式
{CLnkHelper obj;SHELL_LINK_INFO info;//TODO 修改info的内容obj.SetInfo(info);obj.Save(_T("456.lnk"));
}

CLnkHelper.h

#pragma once#include <stdint.h>
#include <string>
#include <shobjidl.h>#ifdef _UNICODE
using _tstring = std::wstring;
using _tfstream = std::wfstream;
#else
using _tstring = std::string;
using _tfstream = std::fstream;
#endiftypedef struct _SHELL_LINK_INFO
{_tstring strFile;       //目标路径_tstring strDesc;       //描述_tstring strArgs;       //参数_tstring strDir;        //工作目录_tstring strIconPath;   //图标路径_tstring strPathRel;    //相对路径WORD wHotkey;           //快捷键int iShowCmd;           //显示命令int iIcon;              //图标索引_SHELL_LINK_INFO():wHotkey(0),iShowCmd(0),iIcon(0){}}SHELL_LINK_INFO;class CLnkHelper
{
public:CLnkHelper();~CLnkHelper();//// @brief: 加载快捷方式// @param: strFile          文件路径// @ret: bool               操作结果// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/objidl/nf-objidl-ipersistfile-load}.bool Load(const _tstring& strFile);//// @brief: 快捷方式保存// @param: strFile          文件路径// @ret: bool               操作结果// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/objidl/nf-objidl-ipersistfile-save}.bool Save(const _tstring& strFile);//// @brief: 获取信息// @param: void// @ret: SHELL_LINK_INFO    信息内容SHELL_LINK_INFO GetInfo() const;//// @brief: 设置信息// @param: info             信息内容// @ret: bool               操作结果bool SetInfo(const SHELL_LINK_INFO& info);//// @remark // @brief: 尝试查找快捷方式目标// @param: hwnd             对话框的父窗口的句柄// @param: fFlags           操作标志// @ret: bool               操作结果// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-resolve}.bool Resolve(HWND hwnd, DWORD fFlags = SLR_NO_UI);//// @brief: 获取/设置目标路径// @param: strFile          目标路径// @param: fFlags           路径类型标志(SLGP_SHORTPATH, SLGP_RAWPATH, SLGP_RELATIVEPRIORITY)// @ret: bool               操作结果// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-getpath}.// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-setpath}.bool GetPath(_tstring& strFile, DWORD fFlags = SLGP_RAWPATH) const;_tstring GetPath(DWORD fFlags = SLGP_RAWPATH) const;bool SetPath(const _tstring& strFile);//// @brief: 获取/设置描述文本// @param: strDesc          描述文本// @ret: bool               操作结果// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-getdescription}.// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-setdescription}.bool GetDescription(_tstring& strDesc) const;_tstring GetDescription() const;bool SetDescription(const _tstring& strDesc);//// @brief: 获取/设置工作目录// @param: strDir           工作目录// @ret: bool               操作结果// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-getworkingdirectory}.// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-setworkingdirectory}.bool GetWorkingDirectory(_tstring& strDir) const;_tstring GetWorkingDirectory() const;bool SetWorkingDirectory(const _tstring& strDir);//// @brief: 获取/设置命令行参数// @param: strArgs          命令行参数// @ret: bool               操作结果// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-getarguments}.// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-setarguments}.bool GetArguments(_tstring& strArgs) const;_tstring GetArguments() const;bool SetArguments(const _tstring& strArgs);//// @brief: 获取/设置快捷键// @param: bModifier        修饰键(HOTKEYF_ALT, HOTKEYF_CONTROL, HOTKEYF_EXT, HOTKEYF_SHIFT)// @param: bKey             普通键// @ret: bool               操作结果// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-gethotkey}.// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-sethotkey}.bool GetHotkey(BYTE& bModifier, BYTE& bKey) const;WORD GetHotkey() const;bool SetHotkey(BYTE bModifier, BYTE bKey);bool SetHotkey(WORD wHotkey);//// @brief: 获取/设置显示命令// @param: iShowCmd         显示命令(SW_SHOWNORMAL, SW_SHOWMAXIMIZED, SW_SHOWMINIMIZED)// @ret: bool               操作结果// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-getshowcmd}.// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-setshowcmd}.bool CLnkHelper::GetShowCmd(int& iShowCmd) const;int CLnkHelper::GetShowCmd() const;bool CLnkHelper::SetShowCmd(int iShowCmd);//// @brief: 获取/设置图标位置// @param: strIconPath      图标路径// @param: iIcon            图标索引// @ret: bool               操作结果// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-geticonlocation}.// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-seticonlocation}.bool GetIconLocation(_tstring& strIconPath, int& iIcon) const;_tstring GetIconLocation(int* piIcon = nullptr) const;bool SetIconLocation(const _tstring& IconPath, int iIcon);//// @brief: 设置相对路径// @param: strPathRel       相对路径// @ret: bool               操作结果// {@link https://learn.microsoft.com/zh-cn/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinka-setrelativepath}.bool GetRelativePath(_tstring& strPathRel) const;_tstring GetRelativePath() const;bool SetRelativePath(const _tstring& strPathRel);private://// @brief: 初始化// @ret: bool               操作结果bool Initialized();//// @brief: 反初始化// @ret: void               无void Uninitialize();private:IShellLink* m_SheelLink;    //Shell 链接接口对象指针IPersistFile* m_ppf;        //存储链接信息接口对象指针bool m_bInit;
};

CLnkHelper.cpp

#include "CLnkHelper.h"
#include <shlguid.h>CLnkHelper::CLnkHelper():m_SheelLink(nullptr),m_ppf(nullptr),m_bInit(false)
{this->Initialized();
}CLnkHelper::~CLnkHelper()
{this->Uninitialize();
}bool CLnkHelper::Initialized()
{HRESULT hr = S_OK;hr = ::CoInitializeEx(nullptr, COINIT_MULTITHREADED);if (FAILED(hr)){return false;}m_bInit = true;hr = ::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*)&m_SheelLink);if (FAILED(hr)){return false;}hr = m_SheelLink->QueryInterface(IID_IPersistFile, (void**)&m_ppf);if (FAILED(hr)){return false;}return true;
}void CLnkHelper::Uninitialize()
{if (m_ppf){m_ppf->Release();m_ppf = nullptr;}if (m_SheelLink){m_SheelLink->Release();m_SheelLink = nullptr;}if (m_bInit){(void)::CoUninitialize();}
}bool CLnkHelper::Load(const _tstring& strFile)
{HRESULT hr = S_OK;if (!m_ppf){return false;}hr = m_ppf->Load(strFile.c_str(), STGM_READWRITE);if (FAILED(hr)){return false;}return true;
}bool CLnkHelper::Save(const _tstring& strFile)
{HRESULT hr = S_OK;if (!m_ppf){return false;}hr = m_ppf->Save(strFile.c_str(), true);return SUCCEEDED(hr);
}SHELL_LINK_INFO CLnkHelper::GetInfo() const
{SHELL_LINK_INFO info;if (m_SheelLink){WIN32_FIND_DATA wfd = { 0 };TCHAR szBuf[MAX_PATH * 4] = { 0 };HRESULT hr = S_OK;hr = m_SheelLink->GetPath(szBuf, _countof(szBuf), &wfd, SLGP_RAWPATH);if (SUCCEEDED(hr)){info.strFile = szBuf;}hr = m_SheelLink->GetPath(szBuf, _countof(szBuf), &wfd, SLGP_RELATIVEPRIORITY);if (SUCCEEDED(hr)){info.strPathRel = szBuf;}hr = m_SheelLink->GetDescription(szBuf, _countof(szBuf));if (SUCCEEDED(hr)){info.strDesc = szBuf;}hr = m_SheelLink->GetWorkingDirectory(szBuf, _countof(szBuf));if (SUCCEEDED(hr)){info.strDir = szBuf;}hr = m_SheelLink->GetArguments(szBuf, _countof(szBuf));if (SUCCEEDED(hr)){info.strArgs = szBuf;}int iIcon = 0;hr = m_SheelLink->GetIconLocation(szBuf, _countof(szBuf), &iIcon);if (SUCCEEDED(hr)){info.strIconPath = szBuf;info.iIcon = iIcon;}int iShowCmd = 0;hr = m_SheelLink->GetShowCmd(&iShowCmd);if (SUCCEEDED(hr)){info.iShowCmd = iShowCmd;}WORD wHotkey = 0;hr = m_SheelLink->GetHotkey(&wHotkey);if (SUCCEEDED(hr)){info.wHotkey = wHotkey;}}return info;
}bool CLnkHelper::SetInfo(const SHELL_LINK_INFO& info)
{if (!m_SheelLink){return false;}m_SheelLink->SetPath(info.strFile.c_str());m_SheelLink->SetRelativePath(info.strPathRel.c_str(), 0);m_SheelLink->SetDescription(info.strDesc.c_str());m_SheelLink->SetArguments(info.strArgs.c_str());m_SheelLink->SetIconLocation(info.strIconPath.c_str(), info.iIcon);m_SheelLink->SetWorkingDirectory(info.strDir.c_str());m_SheelLink->SetHotkey(info.wHotkey);m_SheelLink->SetShowCmd(info.iShowCmd);return true;
}bool CLnkHelper::Resolve(HWND hwnd, DWORD fFlags)
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;hr = m_SheelLink->Resolve(hwnd, fFlags);return SUCCEEDED(hr);
}bool CLnkHelper::GetPath(_tstring& strFile, DWORD fFlags/* = SLGP_RAWPATH*/) const
{if (!m_SheelLink){return false;}WIN32_FIND_DATA wfd = { 0 };TCHAR szBuf[MAX_PATH * 4] = { 0 };HRESULT hr = S_OK;hr = m_SheelLink->GetPath(szBuf, _countof(szBuf), &wfd, fFlags);if (SUCCEEDED(hr)){strFile = szBuf;}return SUCCEEDED(hr);
}_tstring CLnkHelper::GetPath(DWORD fFlags/* = SLGP_RAWPATH*/) const
{if (!m_SheelLink){return _tstring();}WIN32_FIND_DATA wfd = { 0 };TCHAR szBuf[MAX_PATH * 4] = { 0 };HRESULT hr = S_OK;hr = m_SheelLink->GetPath(szBuf, _countof(szBuf), &wfd, fFlags);if (SUCCEEDED(hr)){return szBuf;}return _tstring();
}bool CLnkHelper::SetPath(const _tstring& strFile)
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;hr = m_SheelLink->SetPath(strFile.c_str());return SUCCEEDED(hr);
}bool CLnkHelper::GetDescription(_tstring& strDesc) const
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;TCHAR szBuf[MAX_PATH * 4] = { 0 };hr = m_SheelLink->GetDescription(szBuf, _countof(szBuf));if (SUCCEEDED(hr)){strDesc = szBuf;}return SUCCEEDED(hr);
}_tstring CLnkHelper::GetDescription() const
{if (!m_SheelLink){return _tstring();}HRESULT hr = S_OK;TCHAR szBuf[MAX_PATH * 4] = { 0 };hr = m_SheelLink->GetDescription(szBuf, _countof(szBuf));if (SUCCEEDED(hr)){return szBuf;}return _tstring();
}bool CLnkHelper::SetDescription(const _tstring& strDesc)
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;hr = m_SheelLink->SetDescription(strDesc.c_str());return SUCCEEDED(hr);
}bool CLnkHelper::GetWorkingDirectory(_tstring& strDir) const
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;TCHAR szBuf[MAX_PATH * 4] = { 0 };hr = m_SheelLink->GetWorkingDirectory(szBuf, _countof(szBuf));if (SUCCEEDED(hr)){strDir = szBuf;}return SUCCEEDED(hr);
}_tstring CLnkHelper::GetWorkingDirectory() const
{if (!m_SheelLink){return _tstring();}HRESULT hr = S_OK;TCHAR szBuf[MAX_PATH * 4] = { 0 };hr = m_SheelLink->GetWorkingDirectory(szBuf, _countof(szBuf));if (SUCCEEDED(hr)){return szBuf;}return _tstring();
}bool CLnkHelper::SetWorkingDirectory(const _tstring& strDir)
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;hr = m_SheelLink->SetWorkingDirectory(strDir.c_str());return SUCCEEDED(hr);
}bool CLnkHelper::GetArguments(_tstring& strArgs) const
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;TCHAR szBuf[MAX_PATH * 4] = { 0 };hr = m_SheelLink->GetArguments(szBuf, _countof(szBuf));if (SUCCEEDED(hr)){strArgs = szBuf;}return SUCCEEDED(hr);
}_tstring CLnkHelper::GetArguments() const
{if (!m_SheelLink){return _tstring();}HRESULT hr = S_OK;TCHAR szBuf[MAX_PATH * 4] = { 0 };hr = m_SheelLink->GetArguments(szBuf, _countof(szBuf));if (SUCCEEDED(hr)){return szBuf;}return _tstring();
}bool CLnkHelper::SetArguments(const _tstring& strArgs)
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;hr = m_SheelLink->SetArguments(strArgs.c_str());return SUCCEEDED(hr);
}bool CLnkHelper::GetHotkey(BYTE& bModifier, BYTE& bKey) const
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;WORD wHotkey = 0;hr = m_SheelLink->GetHotkey(&wHotkey);if (SUCCEEDED(hr)){bModifier = HIBYTE(wHotkey);bKey = LOBYTE(wHotkey);}return SUCCEEDED(hr);
}WORD CLnkHelper::GetHotkey() const
{if (!m_SheelLink){return 0;}HRESULT hr = S_OK;WORD wHotkey = 0;hr = m_SheelLink->GetHotkey(&wHotkey);if (SUCCEEDED(hr)){return wHotkey;}return 0;
}bool CLnkHelper::SetHotkey(BYTE bModifier, BYTE bKey)
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;hr = m_SheelLink->SetHotkey(MAKEWORD(bKey, bModifier));return SUCCEEDED(hr);
}bool CLnkHelper::SetHotkey(WORD wHotkey)
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;hr = m_SheelLink->SetHotkey(wHotkey);return SUCCEEDED(hr);
}bool CLnkHelper::GetShowCmd(int& iShowCmd) const
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;hr = m_SheelLink->GetShowCmd(&iShowCmd);return SUCCEEDED(hr);
}int CLnkHelper::CLnkHelper::GetShowCmd() const
{if (!m_SheelLink){return 0;}HRESULT hr = S_OK;int iShowCmd = 0;hr = m_SheelLink->GetShowCmd(&iShowCmd);if (SUCCEEDED(hr)){return iShowCmd;}return 0;
}bool CLnkHelper::SetShowCmd(int iShowCmd)
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;hr = m_SheelLink->SetShowCmd(iShowCmd);return SUCCEEDED(hr);
}bool CLnkHelper::GetIconLocation(_tstring& IconPath, int& iIcon) const
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;TCHAR szBuf[MAX_PATH * 4] = { 0 };hr = m_SheelLink->GetIconLocation(szBuf, _countof(szBuf), &iIcon);if (SUCCEEDED(hr)){IconPath = szBuf;}return SUCCEEDED(hr);
}_tstring CLnkHelper::GetIconLocation(int* piIcon/* = nullptr*/) const
{if (!m_SheelLink){return _tstring();}HRESULT hr = S_OK;TCHAR szBuf[MAX_PATH * 4] = { 0 };int iIcon = 0;hr = m_SheelLink->GetIconLocation(szBuf, _countof(szBuf), &iIcon);if (SUCCEEDED(hr)){if (piIcon){*piIcon = iIcon;}return szBuf;}return _tstring();
}bool CLnkHelper::SetIconLocation(const _tstring& IconPath, int iIcon)
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;hr = m_SheelLink->SetIconLocation(IconPath.c_str(), iIcon);return SUCCEEDED(hr);
}bool CLnkHelper::GetRelativePath(_tstring& strPathRel) const
{if (!m_SheelLink){return false;}WIN32_FIND_DATA wfd = { 0 };TCHAR szBuf[MAX_PATH * 4] = { 0 };HRESULT hr = S_OK;hr = m_SheelLink->GetPath(szBuf, _countof(szBuf), &wfd, SLGP_RELATIVEPRIORITY);if (SUCCEEDED(hr)){strPathRel = szBuf;}return SUCCEEDED(hr);
}_tstring CLnkHelper::GetRelativePath() const
{if (!m_SheelLink){return _tstring();}WIN32_FIND_DATA wfd = { 0 };TCHAR szBuf[MAX_PATH * 4] = { 0 };HRESULT hr = S_OK;hr = m_SheelLink->GetPath(szBuf, _countof(szBuf), &wfd, SLGP_RELATIVEPRIORITY);if (SUCCEEDED(hr)){return szBuf;}return _tstring();
}bool CLnkHelper::SetRelativePath(const _tstring& strRelativePath)
{if (!m_SheelLink){return false;}HRESULT hr = S_OK;hr = m_SheelLink->SetRelativePath(strRelativePath.c_str(), 0);return SUCCEEDED(hr);
}

测试

main.cpp

#include <iostream>
#include <vector>
#include <map>
#include <stdarg.h>
#include <tchar.h>
#include <windows.h>
#include <thread>
#include <strsafe.h>
#include "Win32Utils/CLnkHelper.h"
#include "Win32Utils/CPathUtils.h"int _tmain(int argc, LPCTSTR argv[])
{setlocale(LC_ALL, "");CLnkHelper obj;obj.Load(_T("123.lnk"));SHELL_LINK_INFO info = obj.GetInfo();obj.SetInfo(info);obj.Save(_T("123.lnk"));return 0;
}

这篇关于Win32 快捷方式操作助手类(Lnk快捷方式)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/641575

相关文章

Python正则表达式匹配和替换的操作指南

《Python正则表达式匹配和替换的操作指南》正则表达式是处理文本的强大工具,Python通过re模块提供了完整的正则表达式功能,本文将通过代码示例详细介绍Python中的正则匹配和替换操作,需要的朋... 目录基础语法导入re模块基本元字符常用匹配方法1. re.match() - 从字符串开头匹配2.

Java实现在Word文档中添加文本水印和图片水印的操作指南

《Java实现在Word文档中添加文本水印和图片水印的操作指南》在当今数字时代,文档的自动化处理与安全防护变得尤为重要,无论是为了保护版权、推广品牌,还是为了在文档中加入特定的标识,为Word文档添加... 目录引言Spire.Doc for Java:高效Word文档处理的利器代码实战:使用Java为Wo

sysmain服务可以禁用吗? 电脑sysmain服务关闭后的影响与操作指南

《sysmain服务可以禁用吗?电脑sysmain服务关闭后的影响与操作指南》在Windows系统中,SysMain服务(原名Superfetch)作为一个旨在提升系统性能的关键组件,一直备受用户关... 在使用 Windows 系统时,有时候真有点像在「开盲盒」。全新安装系统后的「默认设置」,往往并不尽编

Python自动化处理PDF文档的操作完整指南

《Python自动化处理PDF文档的操作完整指南》在办公自动化中,PDF文档处理是一项常见需求,本文将介绍如何使用Python实现PDF文档的自动化处理,感兴趣的小伙伴可以跟随小编一起学习一下... 目录使用pymupdf读写PDF文件基本概念安装pymupdf提取文本内容提取图像添加水印使用pdfplum

Python从Word文档中提取图片并生成PPT的操作代码

《Python从Word文档中提取图片并生成PPT的操作代码》在日常办公场景中,我们经常需要从Word文档中提取图片,并将这些图片整理到PowerPoint幻灯片中,手动完成这一任务既耗时又容易出错,... 目录引言背景与需求解决方案概述代码解析代码核心逻辑说明总结引言在日常办公场景中,我们经常需要从 W

使用Python的requests库来发送HTTP请求的操作指南

《使用Python的requests库来发送HTTP请求的操作指南》使用Python的requests库发送HTTP请求是非常简单和直观的,requests库提供了丰富的API,可以发送各种类型的HT... 目录前言1. 安装 requests 库2. 发送 GET 请求3. 发送 POST 请求4. 发送

Python使用python-pptx自动化操作和生成PPT

《Python使用python-pptx自动化操作和生成PPT》这篇文章主要为大家详细介绍了如何使用python-pptx库实现PPT自动化,并提供实用的代码示例和应用场景,感兴趣的小伙伴可以跟随小编... 目录使用python-pptx操作PPT文档安装python-pptx基础概念创建新的PPT文档查看

MySQL 数据库表操作完全指南:创建、读取、更新与删除实战

《MySQL数据库表操作完全指南:创建、读取、更新与删除实战》本文系统讲解MySQL表的增删查改(CURD)操作,涵盖创建、更新、查询、删除及插入查询结果,也是贯穿各类项目开发全流程的基础数据交互原... 目录mysql系列前言一、Create(创建)并插入数据1.1 单行数据 + 全列插入1.2 多行数据

MySQL 临时表与复制表操作全流程案例

《MySQL临时表与复制表操作全流程案例》本文介绍MySQL临时表与复制表的区别与使用,涵盖生命周期、存储机制、操作限制、创建方法及常见问题,本文结合实例代码给大家介绍的非常详细,感兴趣的朋友跟随小... 目录一、mysql 临时表(一)核心特性拓展(二)操作全流程案例1. 复杂查询中的临时表应用2. 临时

MySQL 数据库表与查询操作实战案例

《MySQL数据库表与查询操作实战案例》本文将通过实际案例,详细介绍MySQL中数据库表的设计、数据插入以及常用的查询操作,帮助初学者快速上手,感兴趣的朋友跟随小编一起看看吧... 目录mysql 数据库表操作与查询实战案例项目一:产品相关数据库设计与创建一、数据库及表结构设计二、数据库与表的创建项目二:员