Posts

Showing posts from January, 2024

How to create React project using command prompt?

Image
  How to create React project using command prompt? Ans :- firstly you have to install node js and npm in your system after after that follow these steps:- Step 1:- Open command prompt and for create project write  npx create-next-app Step 2:- Now it will say to write your Project name. Step 3 :- Now write your project name as per your choice. Step 4 :- Now it will ask what is your needs to create a project   Step 5 :- Now you can see dependencies are Installed as shown in below image Step 6 :- Now use this command for change the directory Step 7 :- Now you can see below directory is changed Step 8 :- Now for open the project in Vs code use this command  code . Step 9 :- Now you can see your project is directly opened in Visual Studio Code

Q.we have two tables one is Employee table and another is city table in Employee table we have empId,empName and cityId and in City table we have cityId,cityName and stateName JOIN two tables WHERE empId =100 please write a Query for this.

 Solution :-  SELECT e.empId,           e.empName,           e.cityId,           c.cityName,           c.stateName    FROM Employee e    JOIN City c ON e.cityId = c.cityId    WHERE e.empId =100;